2
0
mirror of https://github.com/openvswitch/ovs synced 2025-09-04 08:15:25 +00:00

vswitchd: Remove bond/migrate MAC argument.

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.
This commit is contained in:
Ethan Jackson
2010-12-03 16:49:02 -08:00
parent a27598cdb2
commit 557c178b31
2 changed files with 4 additions and 8 deletions

View File

@@ -3268,7 +3268,6 @@ bond_unixctl_migrate(struct unixctl_conn *conn, const char *args_,
char *args = (char *) args_; char *args = (char *) args_;
char *save_ptr = NULL; char *save_ptr = NULL;
char *bond_s, *hash_s, *slave_s; char *bond_s, *hash_s, *slave_s;
uint8_t mac[ETH_ADDR_LEN];
struct port *port; struct port *port;
struct iface *iface; struct iface *iface;
struct bond_entry *entry; struct bond_entry *entry;
@@ -3289,10 +3288,7 @@ bond_unixctl_migrate(struct unixctl_conn *conn, const char *args_,
return; return;
} }
if (sscanf(hash_s, ETH_ADDR_SCAN_FMT, ETH_ADDR_SCAN_ARGS(mac)) if (strspn(hash_s, "0123456789") == strlen(hash_s)) {
== ETH_ADDR_SCAN_COUNT) {
hash = bond_hash(mac);
} else if (strspn(hash_s, "0123456789") == strlen(hash_s)) {
hash = atoi(hash_s) & BOND_MASK; hash = atoi(hash_s) & BOND_MASK;
} else { } else {
unixctl_command_reply(conn, 501, "bad hash"); unixctl_command_reply(conn, 501, "bad hash");

View File

@@ -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. the slave, and the MAC learning table entries that hash to each MAC.
.IP "\fBbond/migrate\fR \fIport\fR \fIhash\fR \fIslave\fR" .IP "\fBbond/migrate\fR \fIport\fR \fIhash\fR \fIslave\fR"
Assigns a given MAC hash to a new slave. \fIport\fR specifies the 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 bond port, \fIhash\fR the MAC hash to be migrated (as a decimal
number between 0 and 255) or an Ethernet address to be hashed, and number between 0 and 255), and \fIslave\fR the new slave to be
\fIslave\fR the new slave to be assigned. assigned.
.IP .IP
The reassignment is not permanent: rebalancing or fail-over will The reassignment is not permanent: rebalancing or fail-over will
cause the MAC hash to be shifted to a new slave in the usual cause the MAC hash to be shifted to a new slave in the usual