projects
/
openvswitch
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
datapath: Consolidate checksum compatibility code.
[openvswitch]
/
lib
/
rconn.c
diff --git
a/lib/rconn.c
b/lib/rconn.c
index 36828f3abda1703fcf64cd006c1a8c71181abfb2..c21b7e849210e0189bf43b3d0010aa1d9e9337f2 100644
(file)
--- a/
lib/rconn.c
+++ b/
lib/rconn.c
@@
-30,10
+30,15
@@
#include "timeval.h"
#include "util.h"
#include "vconn.h"
#include "timeval.h"
#include "util.h"
#include "vconn.h"
-
-#define THIS_MODULE VLM_rconn
#include "vlog.h"
#include "vlog.h"
+VLOG_DEFINE_THIS_MODULE(rconn);
+
+COVERAGE_DEFINE(rconn_discarded);
+COVERAGE_DEFINE(rconn_overflow);
+COVERAGE_DEFINE(rconn_queued);
+COVERAGE_DEFINE(rconn_sent);
+
#define STATES \
STATE(VOID, 1 << 0) \
STATE(BACKOFF, 1 << 1) \
#define STATES \
STATE(VOID, 1 << 0) \
STATE(BACKOFF, 1 << 1) \
@@
-710,7
+715,7
@@
rconn_failure_duration(const struct rconn *rconn)
/* Returns the IP address of the peer, or 0 if the peer's IP address is not
* known. */
uint32_t
/* Returns the IP address of the peer, or 0 if the peer's IP address is not
* known. */
uint32_t
-rconn_get_remote_ip(const struct rconn *rconn)
+rconn_get_remote_ip(const struct rconn *rconn)
{
return rconn->remote_ip;
}
{
return rconn->remote_ip;
}
@@
-718,16
+723,16
@@
rconn_get_remote_ip(const struct rconn *rconn)
/* Returns the transport port of the peer, or 0 if the peer's port is not
* known. */
uint16_t
/* Returns the transport port of the peer, or 0 if the peer's port is not
* known. */
uint16_t
-rconn_get_remote_port(const struct rconn *rconn)
+rconn_get_remote_port(const struct rconn *rconn)
{
return rconn->remote_port;
}
/* Returns the IP address used to connect to the peer, or 0 if the
{
return rconn->remote_port;
}
/* Returns the IP address used to connect to the peer, or 0 if the
- * connection is not an IP-based protocol or if its IP address is not
+ * connection is not an IP-based protocol or if its IP address is not
* known. */
uint32_t
* known. */
uint32_t
-rconn_get_local_ip(const struct rconn *rconn)
+rconn_get_local_ip(const struct rconn *rconn)
{
return rconn->local_ip;
}
{
return rconn->local_ip;
}
@@
-735,7
+740,7
@@
rconn_get_local_ip(const struct rconn *rconn)
/* Returns the transport port used to connect to the peer, or 0 if the
* connection does not contain a port or if the port is not known. */
uint16_t
/* Returns the transport port used to connect to the peer, or 0 if the
* connection does not contain a port or if the port is not known. */
uint16_t
-rconn_get_local_port(const struct rconn *rconn)
+rconn_get_local_port(const struct rconn *rconn)
{
return rconn->vconn ? vconn_get_local_port(rconn->vconn) : 0;
}
{
return rconn->vconn ? vconn_get_local_port(rconn->vconn) : 0;
}
@@
-1059,7
+1064,7
@@
state_transition(struct rconn *rc, enum state state)
}
static void
}
static void
-question_connectivity(struct rconn *rc)
+question_connectivity(struct rconn *rc)
{
time_t now = time_now();
if (now - rc->last_questioned > 60) {
{
time_t now = time_now();
if (now - rc->last_questioned > 60) {
@@
-1097,7
+1102,7
@@
copy_to_monitor(struct rconn *rc, const struct ofpbuf *b)
}
static bool
}
static bool
-is_connected_state(enum state state)
+is_connected_state(enum state state)
{
return (state & (S_ACTIVE | S_IDLE)) != 0;
}
{
return (state & (S_ACTIVE | S_IDLE)) != 0;
}