- OpenFlow:
- Allow bitwise masking for SHA and THA fields in ARP, SLL and TLL
fields in IPv6 neighbor discovery messages, and IPv6 flow label.
+ - ovs-dpctl
+ - Support requesting the port number with the "port_no" option in
+ the "add-if" command.
v1.8.0 - xx xxx xxxx
.RS
.IP "\fBtype=\fItype\fR"
Specifies the type of port to add. The default type is \fBsystem\fR.
+.IP "\fBport_no=\fIport\fR"
+Requests a specific port number within the datapath. If this option is
+not specified then one will be automatically assigned.
.IP "\fIkey\fB=\fIvalue\fR"
Adds an arbitrary key-value option to the port's configuration.
.RE
\fIoption\fR of the form \fIkey\fB=\fIvalue\fR adds the specified
key-value option to the port or overrides an existing key's value. An
\fIoption\fR of the form \fIkey\fB=\fR, that is, without a value,
-deletes the key-value named \fIkey\fR. The type of a port cannot be
-changed, so \fBtype=\fItype\fR is only allowed if \fItype\fR is the
-port's existing type.
+deletes the key-value named \fIkey\fR. The type and port number of a
+port cannot be changed, so \fBtype\fR and \fBport_no\fR are only allowed if
+they match the existing configuration.
.TP
\fBdel\-if \fIdp netdev\fR...
Removes each \fInetdev\fR from the list of network devices datapath
char *save_ptr = NULL;
struct netdev *netdev = NULL;
struct smap args;
+ uint16_t port_no = UINT16_MAX;
char *option;
int error;
if (!strcmp(key, "type")) {
type = value;
+ } else if (!strcmp(key, "port_no")) {
+ port_no = atoi(value);
} else if (!smap_add_once(&args, key, value)) {
ovs_error(0, "duplicate \"%s\" option", key);
}
goto next;
}
- error = dpif_port_add(dpif, netdev, NULL);
+ error = dpif_port_add(dpif, netdev, &port_no);
if (error) {
ovs_error(error, "adding %s to %s failed", name, argv[1]);
goto next;
char *type = NULL;
const char *name;
struct smap args;
+ uint32_t port_no;
char *option;
int error;
goto next;
}
type = xstrdup(dpif_port.type);
+ port_no = dpif_port.port_no;
dpif_port_destroy(&dpif_port);
/* Retrieve its existing configuration. */
name, type, value);
failure = true;
}
+ } else if (!strcmp(key, "port_no")) {
+ if (port_no != atoi(value)) {
+ ovs_error(0, "%s: can't change port number from "
+ "%"PRIu32" to %d",
+ name, port_no, atoi(value));
+ failure = true;
+ }
} else if (value[0] == '\0') {
smap_remove(&args, key);
} else {