projects
/
openvswitch
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add some missing Open Flow 1.0 definitions
[openvswitch]
/
lib
/
rconn.c
diff --git
a/lib/rconn.c
b/lib/rconn.c
index 072e1ad824a05fe4f639351c4d51c5c0ef012425..56a7e19764069d28f6a849a375f7f4f045beaad2 100644
(file)
--- a/
lib/rconn.c
+++ b/
lib/rconn.c
@@
-121,6
+121,7
@@
struct rconn {
* attempt to the next. */
ovs_be32 local_ip, remote_ip;
ovs_be16 remote_port;
* attempt to the next. */
ovs_be32 local_ip, remote_ip;
ovs_be16 remote_port;
+ uint8_t dscp;
/* Messages sent or received are copied to the monitor connections. */
#define MAX_MONITORS 8
/* Messages sent or received are copied to the monitor connections. */
#define MAX_MONITORS 8
@@
-160,7
+161,7
@@
static bool rconn_logging_connection_attempts__(const struct rconn *);
* The new rconn is initially unconnected. Use rconn_connect() or
* rconn_connect_unreliably() to connect it. */
struct rconn *
* The new rconn is initially unconnected. Use rconn_connect() or
* rconn_connect_unreliably() to connect it. */
struct rconn *
-rconn_create(int probe_interval, int max_backoff)
+rconn_create(int probe_interval, int max_backoff
, uint8_t dscp
)
{
struct rconn *rc = xzalloc(sizeof *rc);
{
struct rconn *rc = xzalloc(sizeof *rc);
@@
-194,6
+195,7
@@
rconn_create(int probe_interval, int max_backoff)
rc->total_time_connected = 0;
rconn_set_probe_interval(rc, probe_interval);
rc->total_time_connected = 0;
rconn_set_probe_interval(rc, probe_interval);
+ rconn_set_dscp(rc, dscp);
rc->n_monitors = 0;
rc->n_monitors = 0;
@@
-218,6
+220,12
@@
rconn_get_max_backoff(const struct rconn *rc)
return rc->max_backoff;
}
return rc->max_backoff;
}
+void
+rconn_set_dscp(struct rconn *rc, uint8_t dscp)
+{
+ rc->dscp = dscp;
+}
+
void
rconn_set_probe_interval(struct rconn *rc, int probe_interval)
{
void
rconn_set_probe_interval(struct rconn *rc, int probe_interval)
{
@@
-335,7
+343,7
@@
reconnect(struct rconn *rc)
VLOG_INFO("%s: connecting...", rc->name);
}
rc->n_attempted_connections++;
VLOG_INFO("%s: connecting...", rc->name);
}
rc->n_attempted_connections++;
- retval = vconn_open(rc->target, OFP
_VERSION, &rc->vconn
);
+ retval = vconn_open(rc->target, OFP
10_VERSION, &rc->vconn, rc->dscp
);
if (!retval) {
rc->remote_ip = vconn_get_remote_ip(rc->vconn);
rc->local_ip = vconn_get_local_ip(rc->vconn);
if (!retval) {
rc->remote_ip = vconn_get_remote_ip(rc->vconn);
rc->local_ip = vconn_get_local_ip(rc->vconn);