[ovs-dev] [PATCH 2/3] vswitchd: Remove bond/migrate MAC argument.
Ethan Jackson
ethan at nicira.com
Sat Dec 4 02:24:23 UTC 2010
Before this patch one could specify a mac address as part of the
bond/migrate command. This will no longer make sense as bond
hashing becomes more complicated.
---
vswitchd/bridge.c | 6 +-----
vswitchd/ovs-vswitchd.8.in | 6 +++---
2 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c
index 64fa0f0..a6530c6 100644
--- a/vswitchd/bridge.c
+++ b/vswitchd/bridge.c
@@ -3268,7 +3268,6 @@ bond_unixctl_migrate(struct unixctl_conn *conn, const char *args_,
char *args = (char *) args_;
char *save_ptr = NULL;
char *bond_s, *hash_s, *slave_s;
- uint8_t mac[ETH_ADDR_LEN];
struct port *port;
struct iface *iface;
struct bond_entry *entry;
@@ -3289,10 +3288,7 @@ bond_unixctl_migrate(struct unixctl_conn *conn, const char *args_,
return;
}
- if (sscanf(hash_s, ETH_ADDR_SCAN_FMT, ETH_ADDR_SCAN_ARGS(mac))
- == ETH_ADDR_SCAN_COUNT) {
- hash = bond_hash(mac);
- } else if (strspn(hash_s, "0123456789") == strlen(hash_s)) {
+ if (strspn(hash_s, "0123456789") == strlen(hash_s)) {
hash = atoi(hash_s) & BOND_MASK;
} else {
unixctl_command_reply(conn, 501, "bad hash");
diff --git a/vswitchd/ovs-vswitchd.8.in b/vswitchd/ovs-vswitchd.8.in
index 416be24..a1a6310 100644
--- a/vswitchd/ovs-vswitchd.8.in
+++ b/vswitchd/ovs-vswitchd.8.in
@@ -157,9 +157,9 @@ progress, whether it is the active slave, the MAC hashes assigned to
the slave, and the MAC learning table entries that hash to each MAC.
.IP "\fBbond/migrate\fR \fIport\fR \fIhash\fR \fIslave\fR"
Assigns a given MAC hash to a new slave. \fIport\fR specifies the
-bond port, \fIhash\fR either the MAC hash to be migrated (as a decimal
-number between 0 and 255) or an Ethernet address to be hashed, and
-\fIslave\fR the new slave to be assigned.
+bond port, \fIhash\fR the MAC hash to be migrated (as a decimal
+number between 0 and 255), and \fIslave\fR the new slave to be
+assigned.
.IP
The reassignment is not permanent: rebalancing or fail-over will
cause the MAC hash to be shifted to a new slave in the usual
--
1.7.2.3
More information about the dev
mailing list