2
0
mirror of https://github.com/openvswitch/ovs synced 2025-10-29 15:28:56 +00:00

vswitch: Add other-config:in-band-queue to set queue for in-band control.

Until now, in-band control traffic has always gone to the default queue,
typically queue 0.  It makes sense to be able to assing control traffic to
its own queue, so this commit enables that.

Bug #3653.
This commit is contained in:
Ben Pfaff
2010-11-02 10:45:33 -07:00
parent 78f3f31640
commit b1da625048
6 changed files with 77 additions and 12 deletions

View File

@@ -1724,23 +1724,29 @@ bridge_reconfigure_remotes(struct bridge *br,
const struct sockaddr_in *managers,
size_t n_managers)
{
const char *disable_ib_str, *queue_id_str;
bool disable_in_band = false;
int queue_id;
struct ovsrec_controller **controllers;
size_t n_controllers;
bool had_primary;
const char *disable_ib_str;
bool disable_in_band = false;
struct ofproto_controller *ocs;
size_t n_ocs;
size_t i;
/* Check if we should disable in-band control on this bridge. */
disable_ib_str = bridge_get_other_config(br->cfg, "disable-in-band");
if (disable_ib_str && !strcmp(disable_ib_str, "true")) {
disable_in_band = true;
}
/* Set OpenFlow queue ID for in-band control. */
queue_id_str = bridge_get_other_config(br->cfg, "in-band-queue");
queue_id = queue_id_str ? strtol(queue_id_str, NULL, 10) : -1;
ofproto_set_in_band_queue(br->ofproto, queue_id);
if (disable_in_band) {
ofproto_set_extra_in_band_remotes(br->ofproto, NULL, 0);
} else {