aboutsummaryrefslogtreecommitdiff
path: root/vswitchd
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2012-12-26 15:00:06 -0800
committerBen Pfaff <blp@nicira.com>2012-12-26 15:03:22 -0800
commit8b6ff72912871a8101a8427be1c38941326332ad (patch)
treeaf6d83048bc7c6aae104e7861325b370ee0c4af0 /vswitchd
parent061bfea46df4048440a219472719e5def71f4090 (diff)
ovs-vswitch: Make OpenFlow "dp_desc" configurable.
Signed-off-by: Felician Nemeth <nemethf@tmit.bme.hu> [blp@nicira.com refactored the code that this was based on and revised the patch accordingly] Signed-off-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'vswitchd')
-rw-r--r--vswitchd/bridge.c9
-rw-r--r--vswitchd/vswitch.xml6
2 files changed, 15 insertions, 0 deletions
diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c
index d23caf25..e58c3c4b 100644
--- a/vswitchd/bridge.c
+++ b/vswitchd/bridge.c
@@ -186,6 +186,7 @@ static void bridge_configure_mac_table(struct bridge *);
static void bridge_configure_sflow(struct bridge *, int *sflow_bridge_number);
static void bridge_configure_stp(struct bridge *);
static void bridge_configure_tables(struct bridge *);
+static void bridge_configure_dp_desc(struct bridge *);
static void bridge_configure_remotes(struct bridge *,
const struct sockaddr_in *managers,
size_t n_managers);
@@ -597,6 +598,7 @@ bridge_reconfigure_continue(const struct ovsrec_open_vswitch *ovs_cfg)
bridge_configure_sflow(br, &sflow_bridge_number);
bridge_configure_stp(br);
bridge_configure_tables(br);
+ bridge_configure_dp_desc(br);
}
free(managers);
@@ -2901,6 +2903,13 @@ bridge_configure_tables(struct bridge *br)
br->cfg->key_flow_tables[j]);
}
}
+
+static void
+bridge_configure_dp_desc(struct bridge *br)
+{
+ ofproto_set_dp_desc(br->ofproto,
+ smap_get(&br->cfg->other_config, "dp-desc"));
+}
/* Port functions. */
diff --git a/vswitchd/vswitch.xml b/vswitchd/vswitch.xml
index c78899f7..64ad6c72 100644
--- a/vswitchd/vswitch.xml
+++ b/vswitchd/vswitch.xml
@@ -439,6 +439,12 @@
value. May not be all-zero.
</column>
+ <column name="other_config" key="dp-desc">
+ Human readable description of datapath. It it a maximum 256
+ byte-long free-form string to describe the datapath for
+ debugging purposes, e.g. <code>switch3 in room 3120</code>.
+ </column>
+
<column name="other_config" key="disable-in-band"
type='{"type": "boolean"}'>
If set to <code>true</code>, disable in-band control on the bridge