From: Ben Pfaff Date: Tue, 16 Jun 2009 18:05:00 +0000 (-0700) Subject: dpif: Remove obsolete support for datapaths whose names begin with "nl:". X-Git-Tag: v0.90.3~28 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=f7ef6533d8e48565f21a67021e8477b6f5a59ae3;p=sliver-openvswitch.git dpif: Remove obsolete support for datapaths whose names begin with "nl:". The use of "nl:" as a prefix for datapath names has been deprecated for months. That should be long enough for users to update their scripts. --- diff --git a/lib/dpif.c b/lib/dpif.c index 8e8cfcd92..877cfc823 100644 --- a/lib/dpif.c +++ b/lib/dpif.c @@ -151,13 +151,7 @@ dpif_create(const char *name, struct dpif **dpifp) return error; } - if (!strncmp(name, "nl:", 3)) { - char devname[128]; - sprintf(devname, "of%u", minor); - error = ioctl(dpif->fd, ODP_DP_CREATE, devname) < 0 ? errno : 0; - } else { - error = ioctl(dpif->fd, ODP_DP_CREATE, name) < 0 ? errno : 0; - } + error = ioctl(dpif->fd, ODP_DP_CREATE, name) < 0 ? errno : 0; if (!error) { *dpifp = dpif; } else { @@ -1032,10 +1026,6 @@ get_minor_from_name(const char *name, unsigned int *minor) if (!strncmp(name, "dp", 2) && isdigit(name[2])) { *minor = atoi(name + 2); return 0; - } else if (!strncmp(name, "nl:", 3) && isdigit(name[3])) { - /* This is for compatibility only and will be dropped. */ - *minor = atoi(name + 3); - return 0; } else { return EINVAL; } diff --git a/lib/dpif.man b/lib/dpif.man index 72175b0a3..3a58cafb6 100644 --- a/lib/dpif.man +++ b/lib/dpif.man @@ -9,8 +9,3 @@ inclusive. The name of the network device associated with the datapath's local port. (\fB\*(PN\fR internally converts this into a datapath number, as above.) - -.TP -\fBnl:\fIN\fR -This is an obsolete synonym for \fBdp\fIN\fR. -.RE diff --git a/utilities/ovs-dpctl.8.in b/utilities/ovs-dpctl.8.in index 652ebb13f..c43d4ffa0 100644 --- a/utilities/ovs-dpctl.8.in +++ b/utilities/ovs-dpctl.8.in @@ -41,14 +41,13 @@ The following commands manage datapaths. Creates datapath \fIdp\fR. The name of the new datapath's local port depends on how \fIdp\fR is specified: if it takes the form -\fBdp\fIN\fR, the local port will be named \fBdp\fIN\fR; if \fIdp\fR -is \fBnl:\fI, the local port will be named \fBof\fIN\fR; otherwise, +\fBdp\fIN\fR, the local port will be named \fBdp\fIN\fR; otherwise, the local port's name will be \fIdp\fR. This will fail if the host already has 256 datapaths, if a network device with the same name as the new datapath's local port already -exists, or if \fIdp\fR is given in the form \fBdp\fIN\fR or -\fBnl:\fIN\fR and a datapath numbered \fIN\fR already exists. +exists, or if \fIdp\fR is given in the form \fBdp\fIN\fR +and a datapath numbered \fIN\fR already exists. If \fInetdev\fRs are specified, \fBovs\-dpctl\fR adds them to the datapath. diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c index ebf525fbe..da80eed7e 100644 --- a/vswitchd/bridge.c +++ b/vswitchd/bridge.c @@ -369,10 +369,9 @@ bridge_reconfigure(void) svec_init(&new_br); for (i = 0; i < raw_new_br.n; i++) { const char *name = raw_new_br.names[i]; - if ((!strncmp(name, "dp", 2) && isdigit(name[2])) || - (!strncmp(name, "nl:", 3) && isdigit(name[3]))) { + if (!strncmp(name, "dp", 2) && isdigit(name[2])) { VLOG_ERR("%s is not a valid bridge name (bridges may not be " - "named \"dp\" or \"nl:\" followed by a digit)", name); + "named \"dp\" followed by a digit)", name); } else { svec_add(&new_br, name); } diff --git a/vswitchd/ovs-vswitchd.conf.5.in b/vswitchd/ovs-vswitchd.conf.5.in index 00a0d1eb2..5483ad5b1 100644 --- a/vswitchd/ovs-vswitchd.conf.5.in +++ b/vswitchd/ovs-vswitchd.conf.5.in @@ -51,7 +51,7 @@ configure \fBovs\-vswitchd\fR. A bridge (switch) with a given \fIname\fR is configured by specifying the names of its network devices as values for key \fBbridge.\fIname\fB.port\fR. (The specified \fIname\fR may not begin -with \fBdp\fR or \fBnl:\fR followed by a digit.) +with \fBdp\fR followed by a digit.) .PP The names given on \fBbridge.\fIname\fB.port\fR must be the names of existing network devices, except for ``internal ports.'' An internal