From: Ben Pfaff Date: Thu, 12 Mar 2009 17:17:44 +0000 (-0700) Subject: vswitchd: Use datapath ID format instead of MAC format for management ID. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dcb34571b5168827777fa5b19137dcca71f3a48c;p=openvswitch vswitchd: Use datapath ID format instead of MAC format for management ID. A datapath ID is 12 hex digits: XXXXXXXXXXXX. A MAC address is 12 delimited hex digits: XX:XX:XX:XX:XX:XX. Discussed with Justin. --- diff --git a/vswitchd/mgmt.c b/vswitchd/mgmt.c index 4c312ae3..4e1130c7 100644 --- a/vswitchd/mgmt.c +++ b/vswitchd/mgmt.c @@ -79,7 +79,7 @@ mgmt_init(void) svec_add_nocopy(&capabilities, xasprintf("com.nicira.mgmt.manager=true\n")); - mgmt_id = cfg_get_mac(0, "mgmt.id"); + mgmt_id = cfg_get_dpid(0, "mgmt.id"); if (!mgmt_id) { /* Randomly generate a mgmt id */ mgmt_id = pick_fallback_mgmt_id(); @@ -191,7 +191,7 @@ mgmt_reconfigure(void) * xxx need their dpids. */ /* Check if a different mgmt id has been assigned. */ if (cfg_has("mgmt.id")) { - uint64_t cfg_mgmt_id = cfg_get_mac(0, "mgmt.id"); + uint64_t cfg_mgmt_id = cfg_get_dpid(0, "mgmt.id"); if (cfg_mgmt_id != mgmt_id) { mgmt_id = cfg_mgmt_id; } diff --git a/vswitchd/vswitchd.conf.5 b/vswitchd/vswitchd.conf.5 index 44a5776a..655fa9e7 100644 --- a/vswitchd/vswitchd.conf.5 +++ b/vswitchd/vswitchd.conf.5 @@ -404,8 +404,8 @@ the connection has been broken and attempts to reconnect. The default is 15 seconds, and the minimum value is 5 seconds. A management id may be specified with the \fBmgmt.id\fR key. It takes -an id in the form of a MAC address. If one is not specified, a random -id is generated each time \fBvswitchd\fR is started. +an id in the form of exactly 12 hexadecimal digits. If one is not +specified, a random id is generated each time \fBvswitchd\fR is started. .fi .RE .SS "OpenFlow controller connectivity"