sliver-openvswitch.git
12 years agoPrepare Open vSwitch 1.1.2 release. branch-1.1 v1.1.2
Justin Pettit [Tue, 2 Aug 2011 19:22:37 +0000 (12:22 -0700)]
Prepare Open vSwitch 1.1.2 release.

12 years agoofproto-dpif: Ignore ECN bits in OFPAT_SET_NW_TOS actions.
Ben Pfaff [Mon, 18 Jul 2011 22:17:57 +0000 (15:17 -0700)]
ofproto-dpif: Ignore ECN bits in OFPAT_SET_NW_TOS actions.

OpenFlow 1.0 doesn't say that the ECN bits in OFPAT_SET_NW_TOS actions must
be zero, but Open vSwitch ODP implementations do require that, so mask off
those bits before storing the nw_tos into the flow.

12 years agoofproto-dpif: Do not mirror L2 multicast switch protocols to VLANs.
Ben Pfaff [Mon, 18 Jul 2011 21:30:42 +0000 (14:30 -0700)]
ofproto-dpif: Do not mirror L2 multicast switch protocols to VLANs.

Mirroring certain protocols interpreted by switches to a VLAN can deceive
the switch that receives it.  Drop such packets instead of mirroring them.

CC: David Tsai <dtsai@nicira.com>
NIC-401.

12 years agotests: Fix deprecated use of qw.
Ethan Jackson [Tue, 12 Jul 2011 01:56:59 +0000 (18:56 -0700)]
tests: Fix deprecated use of qw.

This causes tests to fail on my system with the following error.

Use of qw(...) as parentheses is deprecated at
/home/root/ovs/tests/flowgen.pl line 35.

12 years agopython: Make invalid UTF-8 sequence messages consistent across Python versions.
Ben Pfaff [Fri, 1 Jul 2011 17:11:30 +0000 (10:11 -0700)]
python: Make invalid UTF-8 sequence messages consistent across Python versions.

Given the invalid input <C0 22>, some versions of Python report <C0> as the
invalid sequence and other versions report <C0 22> as the invalid sequence.
Similarly, given input <ED 80 7F>, some report <ED 80> and others report
<ED 80 7F> as the invalid sequence.  This caused spurious test failures for
the test "no invalid UTF-8 sequences in strings - Python", so this commit
makes the messages consistent by dropping the extra trailing byte from the
message.

I first noticed the longer sequences <C0 22> and <ED 80 7F> on Ubuntu
10.04 with python version 2.6.5-0ubuntu1, but undoubtedly it exists
elsewhere also.

12 years agotests: Fix the two Python XFAIL tests.
Ben Pfaff [Fri, 13 May 2011 21:20:10 +0000 (14:20 -0700)]
tests: Fix the two Python XFAIL tests.

OVS has two Python tests that have always failed, for reasons not
understood, since they were added to the tree.  This commit fixes them.

One problem was that Python was assuming that stdout was encoded in ASCII.
Apparently the only way to "fix" this at runtime is to set PYTHONIOENCODING
to utf_8 in the environment, so this change does that.

Second, it appears that Python really doesn't like to print invalid UTF-8,
so this avoids doing that in python/ovs/json.py, instead just printing
the hexadecimal values of the invalid bytes.  For consistency, it makes
the same change to the C version.

Third, the C version of test-ovsdb doesn't check UTF-8 for consistency, it
just sends it blindly to the OVSDB server, but Python does check it and so
it bails out earlier.  This commit changes the Python version of the
"no invalid UTF-8 sequences in strings" to allow for the slight difference
in output that occurs for that reason.

Finally, test-ovsdb.py needs to convert error messages to Unicode
explicitly before printing them in the "parse-atoms" function.  I don't
really understand why, but now it works.

12 years agotunneling: Force selection of an IP ID with GRE.
Jesse Gross [Thu, 30 Jun 2011 19:49:11 +0000 (12:49 -0700)]
tunneling: Force selection of an IP ID with GRE.

By default we set the DF bit on tunneled packets because we want to
get path MTU discovery from the underlying network.  In turn this
causes Linux to leave the IP ID as 0 because it believes that
fragmentation can never occur.  However, with GRE fragmentation is
still possible because we may get a large packet to be encapsulated
and let the local IP stack do fragmentation.  As long as packets are
kept in order fragments are not misassociated and everything works fine.
However, if there is reordering in the underlying network then packets
can become corrupted.  This forces selection of an IP ID for GRE packets
to avoid misassociation.

Bug #6128

Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
12 years agoofproto: Fix typo in documentation.
Ben Pfaff [Thu, 30 Jun 2011 16:23:53 +0000 (09:23 -0700)]
ofproto: Fix typo in documentation.

Using .RS instead of .RE caused the rest of the manpage to be indented two
levels too deep.

12 years agoxenserver: Restart HA daemon after force-reload-kmod.
Ben Pfaff [Wed, 29 Jun 2011 22:55:15 +0000 (15:55 -0700)]
xenserver: Restart HA daemon after force-reload-kmod.

Otherwise its heartbeats start failing after the reload and the XenServer
reboots after a minute or so.

Thanks to Justin Pettit for figuring out that this was HA-related.

Bug #5706.
Reported-by: Henrik Amren <henrik@nicira.com>
12 years agoofp-parse: Fix invalid memory use.
Ethan Jackson [Tue, 28 Jun 2011 20:22:18 +0000 (13:22 -0700)]
ofp-parse: Fix invalid memory use.

In some cases, parsing of the note action could cause a realloc
which would result in the use of memory which was no longer
allocated.

12 years agoxenserver: Fix use of undefined variable.
Ethan Jackson [Thu, 16 Jun 2011 22:05:22 +0000 (15:05 -0700)]
xenserver: Fix use of undefined variable.

Found with pylint.

E:167:update_in_band_mgmt: Undefined variable 'bridge'

Signed-off-by: Ethan Jackson <ethan@nicira.com>
12 years agostream-ssl: Clear CAs for certificate verification before adding new ones.
Ben Pfaff [Wed, 15 Jun 2011 18:50:24 +0000 (11:50 -0700)]
stream-ssl: Clear CAs for certificate verification before adding new ones.

If the CA certificate changed and OVS added the new CA certificate, the
change was ineffective.  Clearing the certificate store before adding the
new CA certificate fixes the problem.

I don't know exactly why this fixes the problem, but in my testing it does.

Bug #2921.
Reported-by: Dan Wendlandt <dan@nicira.com>
Reported-by: Pierre Ettori <pettori@nicira.com>
12 years agoxenserver: Don't delete pidfile in stop_daemon.
Ben Pfaff [Wed, 15 Jun 2011 23:39:49 +0000 (16:39 -0700)]
xenserver: Don't delete pidfile in stop_daemon.

Deleting the pidfile introduces a minor race: if some other process is
starting a daemon at the same time that the init script is stopping the
same daemon, then this could delete the new daemon's pidfile.

This is really a theoretical risk, because no one should be starting and
stopping a single daemon at the same time.

12 years agoxenserver: Run "depmod" after old modules are removed by "rpm -U".
Ben Pfaff [Tue, 14 Jun 2011 17:36:56 +0000 (10:36 -0700)]
xenserver: Run "depmod" after old modules are removed by "rpm -U".

http://fedoraproject.org/wiki/Packaging/ScriptletSnippets says that
package upgrade does the following steps:

    1.  %pretrans of new package
    2.  %pre of new package
    3. (package install)
    4.  %post of new package
    5.  %triggerin of other packages (set off by installing new package)
    6.  %triggerin of new package (if any are true)
    7.  %triggerun of old package (if it's set off by uninstalling the old
       package)
    8.  %triggerun of other packages (set off by uninstalling old package)
    9.  %preun of old package
   10. (removal of old package)
   11.  %postun of old package
   12.  %triggerpostun of old package (if it's set off by uninstalling the
       old package)
   13.  %triggerpostun of other packages (if they're setu off by
       uninstalling the old package)
   14.  %posttrans of new package

We're getting in trouble because the %post runs in step 4 before the
old files are removed in step 10, so depmod is finding the old modules.
This commit switches to running depmod in step 14 instead, after the
old files are removed.

Bug #5916.
Reported-by: Jesse Gross <jesse@nicira.com>
Reported-by: Henrik Amren <henrik@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
12 years agomac-learning: Fix serious performance bug in the learning table.
Ethan Jackson [Fri, 22 Jul 2011 00:58:47 +0000 (17:58 -0700)]
mac-learning: Fix serious performance bug in the learning table.

Due to a typo, the mac-learning hash table had dissolved into a
linked list.  This caused a significant reduction in performance.

12 years agodatapath: An expanded table should be larger than its predecessor
Simon Horman [Tue, 12 Jul 2011 06:52:44 +0000 (15:52 +0900)]
datapath: An expanded table should be larger than its predecessor

This resolves what appears to be a think-o in tbl_expand()

* Old Logic: Always create tables with TBL_MIN_BUCKETS buckets
* New Logic: Create tables twice as big as their predecessor

When sending 10,000 flows through ovs-vswitchd:
* Old Logic: CPU bound in tbl_lookup(), significant packet loss
* New Logic: ~10% of one core used, negligible packet loss

Tested with an Intel E5520 @ 2.27GHz,
flows from an ethernet device to to a dummy interface with
no address configured.

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Jesse Gross <jesse@nicira.com>
12 years agovconn-stream: Always call the stream's run function from vconn_stream_run().
Ben Pfaff [Fri, 8 Jul 2011 16:11:55 +0000 (09:11 -0700)]
vconn-stream: Always call the stream's run function from vconn_stream_run().

The stream's run function ensures that data buffered in the stream itself
gets pushed to the network.  Only the SSL stream class has such a run
function, which means that SSL stream data failed to be pushed to the
remote peer in a timely manner in some cases.

Many thanks to Alex Yip for narrowing this down.

Reported-by: Alex Yip <alex@nicira.com>
Tested-by: Alex Yip <alex@nicira.com>
Bug #6221.

12 years agoovsdb: Fix segfault in ovsdb_file_txn_row_from_json().
Ben Pfaff [Wed, 6 Jul 2011 21:22:42 +0000 (14:22 -0700)]
ovsdb: Fix segfault in ovsdb_file_txn_row_from_json().

If 'error' is nonnull then we destroy the row, so we must not try to reuse
the row immediately after that.

Support request #6155.
Repoted-by: Geoff White <gwhite@nicira.com>
12 years agoDebian: set source format to 3.0 (quilt)
Simon Horman [Thu, 23 Jun 2011 19:50:09 +0000 (12:50 -0700)]
Debian: set source format to 3.0 (quilt)

This is my preferred package format as it allows changes
to be added as patches when the Debian package needs to
be updated between upstream releases.

I have been making this change in the Debian packages
so it seems as well to include it upstream.

[Update to debian/automake.mk by Ben Pfaff.]

12 years agodebian: Make openvswitch-switch depend on Python.
Ben Pfaff [Tue, 3 May 2011 16:59:42 +0000 (09:59 -0700)]
debian: Make openvswitch-switch depend on Python.

ovs-pcap,.ovs-tcpundump, and ovs-vlan-test are all written in Python, so
openvswitch-switch needs to depend on Python.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Reported by lintian.

12 years agodebian: Drop dependency from python-openvswitch to openvswitch-switch.
Ben Pfaff [Wed, 15 Jun 2011 17:23:32 +0000 (10:23 -0700)]
debian: Drop dependency from python-openvswitch to openvswitch-switch.

This dependency is unnecessary.  The Python code can be used without the
switch, so remove it.

12 years agoDebian: Update changelog for 1.1.0-1 and 1.1.1-1
Simon Horman [Wed, 15 Jun 2011 01:59:26 +0000 (10:59 +0900)]
Debian: Update changelog for 1.1.0-1 and 1.1.1-1

This reflects the chagnelogs uploaded to Debian.Org

12 years agoDebian: ${source:Version} dependency on python-openvswitch
Simon Horman [Wed, 15 Jun 2011 01:59:24 +0000 (10:59 +0900)]
Debian: ${source:Version} dependency on python-openvswitch

As reported by lintian:

E: openvswitch source: not-binnmuable-any-depends-all openvswitch-ipsec -> python-openvswitch
N:
N:    The package is not safely binNMUable because an arch:any package depends
N:    on an arch:all package with a (= ${Source-Version}) or (=
N:    ${binary:Version}) relationship. Please use (= ${source:Version})
N:    instead.
N:
N:    Severity: important, Certainty: certain

12 years agoDebian: Update standards version from 3.9.1 to 3.9.2
Simon Horman [Wed, 15 Jun 2011 01:59:23 +0000 (10:59 +0900)]
Debian: Update standards version from 3.9.1 to 3.9.2

12 years agoDebian: Add ${misc:Depends} dependency to python-openvswitch
Simon Horman [Wed, 15 Jun 2011 01:59:22 +0000 (10:59 +0900)]
Debian: Add ${misc:Depends} dependency to python-openvswitch

As reported by lintian -i:

W: openvswitch source: debhelper-but-no-misc-depends python-openvswitch
N:
N:    The source package uses debhelper, but it does not include
N:    ${misc:Depends} in the given binary package's debian/control entry.  Any
N:    debhelper command may add dependencies to ${misc:Depends} that are
N:    required for the work that it does, so recommended best practice is to
N:    always add ${misc:Depends} to the dependencies of each binary package if
N:    debhelper is in use.
N:
N:    Refer to the debhelper(7) manual page for details.
N:
N:    Severity: normal, Certainty: possible

12 years agopython: Fix "make install" on systems without Python.
Ben Pfaff [Mon, 13 Jun 2011 16:37:09 +0000 (09:37 -0700)]
python: Fix "make install" on systems without Python.

Reported-by: 冯全树(Crab) <fqs888@126.com>
12 years agodatapath: Check for supported kernel versions.
Jesse Gross [Mon, 13 Jun 2011 18:36:19 +0000 (11:36 -0700)]
datapath: Check for supported kernel versions.

Most of the time kernels older or newer than the ones we support
simply fail to compile.  However, sometimes they appear to succeed
but then cause problems later on.  This explicitly checks for
supported versions at compile time.

Signed-off-by: Jesse Gross <jesse@nicira.com>
12 years agolearning-switch: Wildcard more fields to avoid normalization warnings.
Ben Pfaff [Wed, 1 Jun 2011 16:34:20 +0000 (09:34 -0700)]
learning-switch: Wildcard more fields to avoid normalization warnings.

FWW_NW_TOS and some other L3 fields weren't wildcarded, but should have
been.  It's better to start with all fields wildcarded and then unwildcard
the ones that shouldn't be.

Reported-by: Jean Tourrilhes <jt@hpl.hp.com>
12 years agoofp-util: Don't warn for different forms of nw_{src,dst} wildcards.
Ben Pfaff [Fri, 29 Apr 2011 22:47:26 +0000 (15:47 -0700)]
ofp-util: Don't warn for different forms of nw_{src,dst} wildcards.

OpenFlow 1.0 uses a 6-bit field to express the number of wildcarded bits
in the nw_src and nw_dst field.  Any value 32 or greater in these fields
(binary 1xxxxx) means that all of the bits are wildcarded.  That means
that there are 32 different ways to express a wildcarded nw_src or nw_dst.
At least two of those seem sensible (100000 and 111111) so we shouldn't
warn about one of them.

This fixes the problem by ORing with 100000 instead of 111111, so that any
already-correct wildcarded mask won't be affected.

This fix allows us to update some tests.

Reviewed-by: Simon Horman <horms@verge.net.au>
12 years agoovs-controller: Honor --wildcard option.
Ben Pfaff [Tue, 26 Apr 2011 00:08:09 +0000 (17:08 -0700)]
ovs-controller: Honor --wildcard option.

This option was documented but ignored.

12 years agolearning-switch: Don't limit message queued by --with-flows.
Ben Pfaff [Wed, 1 Jun 2011 17:53:53 +0000 (10:53 -0700)]
learning-switch: Don't limit message queued by --with-flows.

queue_tx() intentionally limits the number of outstanding OpenFlow messages
queued to the switch.  This was unintentionally being applied to the
messages queued to the switch at startup by ovs-ofctl's --with-flows
command.  This patch should fix the problem, by calling rconn_send()
directly instead of through queue_tx().

Ahmed reported that with this patch there was still a problem when 30,000
flows were specified in the file.

Reported-by: Ahmed Bilal <numan252@gmail.com>
12 years agoovsdb: Check ovsdb_mutation_set_execute() return value in transactions.
Ben Pfaff [Tue, 31 May 2011 19:50:57 +0000 (12:50 -0700)]
ovsdb: Check ovsdb_mutation_set_execute() return value in transactions.

Errors from this function were being ignored, which meant that transactions
could use "mutate" to bypass number-of-elements constraints on sets and
maps.  This fixes the problem and adds a test to prevent the problem from
recurring.

Bug #5781.

12 years agoovsdb: Fix spelling of "constraint violation" in error tag.
Ben Pfaff [Tue, 31 May 2011 18:30:16 +0000 (11:30 -0700)]
ovsdb: Fix spelling of "constraint violation" in error tag.

12 years agoPrepare Open vSwitch 1.1.1 release. v1.1.1
Justin Pettit [Thu, 26 May 2011 23:38:40 +0000 (16:38 -0700)]
Prepare Open vSwitch 1.1.1 release.

12 years agoxenserver: Fix bugs related to using xe-switch-network-backend in spec file.
Justin Pettit [Tue, 10 May 2011 06:30:07 +0000 (23:30 -0700)]
xenserver: Fix bugs related to using xe-switch-network-backend in spec file.

Commit daf2ebb (xenserver: Use xe-switch-network-stack in RPM spec
file.) changed the spec file to use xe-switch-network-backend instead of
directly modifying "/etc/xensource/network.conf".  It incorrectly
assumed that the command was in the search path.  It also didn't take
into account that the command will remove the "openvswitch" service with
chkconfig.  This commit fixes those errors.

Signed-off-by: Justin Pettit <jpettit@nicira.com>
12 years agobridge: Don't configure QoS without Queues.
Ethan Jackson [Sat, 7 May 2011 00:02:02 +0000 (17:02 -0700)]
bridge: Don't configure QoS without Queues.

It doesn't make sense to create a QoS object without any queues.
Before this patch, OVS would configure the QoS object and as a
result drop all traffic going through the affected interface.  With
this patch, OVS will simply clear QoS configuration on the
interface.

Bug #5583.

12 years agoxenserver: Use xe-switch-network-stack in RPM spec file.
Justin Pettit [Wed, 27 Apr 2011 02:58:19 +0000 (19:58 -0700)]
xenserver: Use xe-switch-network-stack in RPM spec file.

The proper way to switch the networking back-end is to use the
"xe-switch-network-stack" command rather than directly modifying
"/etc/xensource/network.conf".  Use that method in the spec file.

12 years agoofp-util: Fix validation of OFPAT_SET_VLAN_PCP actions.
Ben Pfaff [Wed, 4 May 2011 22:47:27 +0000 (15:47 -0700)]
ofp-util: Fix validation of OFPAT_SET_VLAN_PCP actions.

Found by sparse.

12 years agoxenserver: Don't remove network.dbcache on uninstall.
Ben Pfaff [Tue, 3 May 2011 18:03:08 +0000 (11:03 -0700)]
xenserver: Don't remove network.dbcache on uninstall.

network.dbcache was introduced by Open vSwitch for its own purposes, but
it has now migrated into the base install of XenServer, which uses it
whether Open vSwitch is installed or not, so we should no longer remove it
on package uninstall.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Reported-by: Bob Ball <bob.ball@citrix.com>
12 years agoxenserver: Use .../extra not .../kernel/extra for kernel modules.
Ben Pfaff [Tue, 3 May 2011 17:51:06 +0000 (10:51 -0700)]
xenserver: Use .../extra not .../kernel/extra for kernel modules.

On XenServer, depmod.conf causes modules in /lib/modules/$(uname -r)/extra
to take priority over standard modules.  Unfortunately, we were installing
our modules in /lib/modules/$(uname -r)/kernel/extra, which isn't special.
This commit fixes the problem.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Reported-by: Bob Ball <bob.ball@citrix.com>
12 years agodpif-linux: Recycle leaked ports.
Ethan Jackson [Fri, 29 Apr 2011 20:12:19 +0000 (13:12 -0700)]
dpif-linux: Recycle leaked ports.

When ports are deleted from the datapath they need to be added to
an LRU list maintained in dpif-linux so they may be reallocated.
When using vswitchd to delete the ports this happens automatically.
However, if a port is deleted directly from the datapath it is
never reclaimed by dpif-linux.  If this happens often, eventually
no ports will be available for allocation and dpif-linux will fall
back to using the old, kernel implemented, allocation strategy.

This commit fixes the problem by automatically reclaiming ports
missing from the datapath whenever the list of ports in the
datapath is dumped.

Bug #2140.

12 years agoxenserver: remove unneeded macro definitions
Sajjad Lateef [Tue, 17 May 2011 02:12:56 +0000 (19:12 -0700)]
xenserver: remove unneeded macro definitions

The macro binsuffix is no longer needed. It has been replaced with
kernel_flavor that is passed on the command line.

The macro kernel_version is passed on the command line. Redefining
the macro inside the spec file leads to build failures.

Signed-off-by: Sajjad Lateef <slateef@nicira.com>
12 years agoxenserver: modify module spec file
Sajjad Lateef [Tue, 17 May 2011 00:27:36 +0000 (17:27 -0700)]
xenserver: modify module spec file

Based on feedback from Citrix about building for multiple kernels,
the spec file has been modified to take three arguments on the
command line: kernel_name, kernel_version and kernel_flavor.

The kernel_flavor is either xen or kdump. The kernel_name is the
Name value embedded in the kernel rpm and the kernel_version
is Version-Release values embedded in the kernel rpm. The
xen_version is calculated.

The INSTALL document has been updated to reflect these changes.

Signed-off-by: Sajjad Lateef <slateef@nicira.com>
(cherry picked from commit b11e4aa7e92854612a4d139b8a620d036a5d41a2)

13 years agodatapath: Avoid freeing wild pointer in corner case.
Ben Pfaff [Thu, 28 Apr 2011 23:34:56 +0000 (16:34 -0700)]
datapath: Avoid freeing wild pointer in corner case.

In odp_flow_cmd_new_or_set(), if flow_actions_alloc() fails in the "new
flow" case, then flow_put() will kfree() the new flow's 'sf_acts' pointer,
but nothing has initialized that pointer.  Initialize the pointer to NULL
to avoid the problem.

Found by inspection.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
13 years agoovs-monitor-ipsec: Allow IKE fragmentation
Justin Pettit [Wed, 27 Apr 2011 15:46:38 +0000 (08:46 -0700)]
ovs-monitor-ipsec: Allow IKE fragmentation

Some (broken) firewalls do not properly pass UDP fragments, which will
prevent IKE from completing.  This commit enables the racoon option to
allow application-level fragmenting and allow security associations to
be created.

13 years agodatapath: Make git ignore linux-2.6/vlan.c.
Andrew Evans [Thu, 28 Apr 2011 01:58:16 +0000 (18:58 -0700)]
datapath: Make git ignore linux-2.6/vlan.c.

Signed-off-by: Andrew Evans <aevans@nicira.com>
13 years agoofproto: Adjust netdev_monitor when switching netdevs.
Ben Pfaff [Thu, 21 Apr 2011 23:25:41 +0000 (16:25 -0700)]
ofproto: Adjust netdev_monitor when switching netdevs.

This fixes a segfault in the "ofproto - mod-port" test.  The segfault
should not occur--there must be a bug in the netdev_monitor or possibly
the netdev_dummy implementation--but the netdev_monitor_remove() and
netdev_monitor_add() calls are definitely wanted here in any case to ensure
that the new netdev, not the old one, is what gets monitored.

13 years agobridge: Tolerate missing Port and Interface records for local port.
Ben Pfaff [Wed, 13 Apr 2011 18:10:44 +0000 (11:10 -0700)]
bridge: Tolerate missing Port and Interface records for local port.

Until now, ovs-vswitchd has been unable to configure IP addresses and
routes for bridges whose Bridge records lack a Port and an Interface
record for the bridge's local port (e.g. OFPP_LOCAL, the port with the
same name as the bridge itself).  When such a bridge was reconfigured,
ovs-vswitchd would output a log message that worried people.

This commit fixes the internal limitation that led to the message being
printed.

Bug #5385.

13 years agoofproto: Rework and fix bugs in port change detection.
Ben Pfaff [Wed, 20 Apr 2011 20:48:11 +0000 (13:48 -0700)]
ofproto: Rework and fix bugs in port change detection.

The OpenFlow port change detection code in update_port() is supposed to
send out an OFPT_PORT_STATUS message whenever an OpenFlow port is added or
removed or changes in some way.  This commit fixes a number of bugs that
have persisted until now.

First, if a port with a given name is removed from the datapath and a new
port with the same name but a different port number is added to the
datapath, then update_port() would report this as a port "modify" change.
Reporting this as a "modify" seems likely to confuse controllers, which
have no reason to realize that the old port was deleted and may not
understand why a port that has not been reported as added would be
modified.  (This scenario is more likely than before, because the Linux
datapath implementation no longer quickly reuses port numbers.  This
problem has actually been reported in testing.)  This commit fixes the
problem by changing update_port() to report a "delete" of the old port
followed by an "add" of the new port.

Second, suppose that a datapath initially has "eth1" on port 1 and "eth2"
on port 2.  Then, "eth1" gets removed and "eth2" is reassigned to port 1.
If update_port() is first passed "eth2", then the old implementation would
have sent out an OpenFlow "modify" notification instead of "delete"
followed by "add", which is the same as the previous scenario.  But as a
further wrinkle, it would have failed to remove "eth1", which meant that we
ended up with two "ofports" with port number 1!  This commit fixes this
problem too.

Reported-by: David Tsai <dtsai@nicira.com>
Bug #5466.
NIC-372.

13 years agoofproto: Consistently use netdev's name instead of ofp_phy_port name.
Ben Pfaff [Wed, 20 Apr 2011 20:03:45 +0000 (13:03 -0700)]
ofproto: Consistently use netdev's name instead of ofp_phy_port name.

There are at least two ways to get an ofport's name: from the netdev using
netdev_get_name() or from the ofp_phy_port's 'name' member.  Some code used
one, some used the other.  This switches all relevant code to use only
netdev_get_name(), because the 'name' member in ofp_phy_port is
fixed-length and thus a long name could be truncated.

This isn't a problem under Linux since the maximum length of a network
device's name under Linux is the same as the field width in ofp_phy_port.

13 years agosocket-util: Use portable solution for setting Unix socket permissions.
Ben Pfaff [Thu, 21 Apr 2011 16:22:39 +0000 (09:22 -0700)]
socket-util: Use portable solution for setting Unix socket permissions.

Requested-by: Jesse Gross <jesse@nicira.com>
13 years agoINSTALL.Linux: Mention that SSL options require building with SSL support.
Ben Pfaff [Fri, 8 Apr 2011 19:40:49 +0000 (12:40 -0700)]
INSTALL.Linux: Mention that SSL options require building with SSL support.

Reported-by: Aaron Rosen <arosen@clemson.edu>
13 years agobridge: Avoid memory leak from RSPAN mirrors in bridge_destroy().
Ben Pfaff [Mon, 11 Apr 2011 18:22:39 +0000 (11:22 -0700)]
bridge: Avoid memory leak from RSPAN mirrors in bridge_destroy().

Mirrors that output to ports will be destroyed when their output ports are
destroyed, but mirrors that output to VLANs ("RSPAN" mirrors) don't get
automatically destroyed like this and we need to take care of them in a
separate loop.

13 years agoofp-util: Properly handle "tun_id"s in tun_id_from_cookie flows.
Ben Pfaff [Mon, 18 Apr 2011 17:11:43 +0000 (10:11 -0700)]
ofp-util: Properly handle "tun_id"s in tun_id_from_cookie flows.

Just setting the tun_id field isn't enough--it's also necessary to set
the tun_id_mask.  Otherwise the call to cls_rule_zero_wildcarded_fields()
at the end of ofputil_cls_rule_from_match() will zero out the tun_id again.

This was broken by commit 8368c090cab "Implement arbitrary bitwise masks
for tun_id field" back in January.  (This makes me wonder whether we can
drop support for tun_id_from_cookie now.)

Reported-by: Dan Wendlandt <dan@nicira.com>
13 years agosocket-util: Properly set socket permissions in make_unix_socket().
Ben Pfaff [Mon, 18 Apr 2011 18:24:50 +0000 (11:24 -0700)]
socket-util: Properly set socket permissions in make_unix_socket().

Under Linux, at least, bind and fchmod interact for Unix sockets in a way
that surprised me.  Calling fchmod() on a Unix socket successfully sets the
permissions for the socket's own inode.  But that has no effect on any
inode that has already been created in the file system by bind(), because
that inode is not the same as the one for the Unix socket itself.

However, if you bind() *after* calling fchmod(), then the bind() takes the
permissions for the new inode from the Unix socket inode, which has the
desired effect.

This also adds a more portable fallback for non-Linux systems.

Reported-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
13 years agobridge: Fix VLAN selection mirroring logic.
Ben Pfaff [Fri, 8 Apr 2011 19:52:23 +0000 (12:52 -0700)]
bridge: Fix VLAN selection mirroring logic.

The logic here did not make sense.  A packet arriving on a port is mirrored
if the port is a mirroring source port AND (not OR) the packet is in one of
the VLANs that is mirrored.

This test has been here since the mirroring code was introduced.  It seems
to me that it was never correct.

13 years agobridge: Reintroduce log message that was lost (and wrong).
Ben Pfaff [Tue, 29 Mar 2011 18:16:31 +0000 (11:16 -0700)]
bridge: Reintroduce log message that was lost (and wrong).

Setting the 'mac' in the Interface record for a bridge's local port has
always been ineffective, but the log message was suppressed because of a
check at too high of a level.  This commit fixes the problem.  It also
fixes the wording of the log message, which has been obsolete since the
introduction of the database.

Finally, it seems better to check for the local port before checking for a
multicast address, so this reverses the order of the checks.

13 years agodaemon: Reduce log level of "pid file is stale" message.
Ben Pfaff [Tue, 5 Apr 2011 19:17:08 +0000 (12:17 -0700)]
daemon: Reduce log level of "pid file is stale" message.

This message will appear repeatedly when ovs-vswitchd is running, if there
is any stale pidfile in /var/run/openvswitch, because ovs-vswitchd reads
all of the pidfiles in that directory periodically to update statistics.

13 years agobridge: Initialize mirrors' uuid member.
Ben Pfaff [Tue, 5 Apr 2011 21:17:55 +0000 (14:17 -0700)]
bridge: Initialize mirrors' uuid member.

Otherwise mirrors get destroyed and re-created on every reconfiguration.

13 years agoofproto: Avoid memory leak in classifier on destruction.
Ben Pfaff [Tue, 5 Apr 2011 22:58:06 +0000 (15:58 -0700)]
ofproto: Avoid memory leak in classifier on destruction.

ofproto_flush_flows() flushes the flow table but then it reintroduces flows
required by fail-open or in-band.  These are then leaked when the
classifier is destroyed a little later.

This fixes the problem by not reintroducing these flows when ofproto is
being destroyed.

13 years agoFix calls to ctype functions.
Ben Pfaff [Fri, 15 Apr 2011 16:31:36 +0000 (09:31 -0700)]
Fix calls to ctype functions.

The ctype functions often need casts to be fully C standards compliant.
Here's the full explanation that I used to post to comp.lang.c from time
to time when the issue came up:

    With the to*() and is*() functions, you should be careful to cast
    `char' arguments to `unsigned char' before calling them.  Type `char'
    may be signed or unsigned, depending on your compiler or its
    configuration.  If `char' is signed, then some characters have
    negative values; however, the arguments to is*() and to*() functions
    must be nonnegative (or EOF).  Casting to `unsigned char' fixes this
    problem by forcing the character to the corresponding positive value.

This fixes the following warnings from some version of GCC:

lib/ofp-parse.c:828: warning: array subscript has type 'char'
lib/ofp-print.c:617: warning: array subscript has type 'char'

Reported-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
13 years agovswitchd: Document how to disable inactivity probes.
Ben Pfaff [Thu, 14 Apr 2011 17:22:21 +0000 (10:22 -0700)]
vswitchd: Document how to disable inactivity probes.

This has always been implemented but it was not documented until now.

Reported-by: Alex Yip <alex@nicira.com>
13 years agoxenserver: Fix typo in RPM install message.
Ethan Jackson [Tue, 12 Apr 2011 20:20:13 +0000 (13:20 -0700)]
xenserver: Fix typo in RPM install message.

13 years agoxenserver: Don't openvswitch-xapi-update in bridge mode.
Ethan Jackson [Tue, 12 Apr 2011 01:33:06 +0000 (18:33 -0700)]
xenserver: Don't openvswitch-xapi-update in bridge mode.

This commit causes the init scripts not to call the
openvswitch-cfg-update plugin when in bridge mode.

13 years agoxenserver: Warn when upgrading OVS on a bridged system.
Ethan Jackson [Tue, 12 Apr 2011 01:29:02 +0000 (18:29 -0700)]
xenserver:  Warn when upgrading OVS on a bridged system.

13 years agoovsdb-idl: Suppress "delete" operations for garbage-collected tables.
Ben Pfaff [Tue, 12 Apr 2011 18:31:58 +0000 (11:31 -0700)]
ovsdb-idl: Suppress "delete" operations for garbage-collected tables.

Deciding what delete operations to issue on garbage-collected tables has
been a bit of a difficult issue for ovs-vsctl.  When garbage collection was
introduced in commit c5f341a "ovsdb: Implement garbage collection",
ovs-vsctl did not issue any deletions for these tables at all.  As a side
effect, ovs-vsctl did not notice that records were going to be deleted.
That meant that when multiple commands were issued in one ovs-vsctl run,
ovs-vsctl could get confused by apparent duplicate records that did not
in fact exist.  Commit 28a14bf "ovs-vsctl: Back out garbage collection
changes" fixed the problem by putting all of the explicit deletions back
into ovs-vsctl.

However, adding these explicit deletions had the price that it then became
(again) impossible to use ovs-vsctl commands to delete duplicates, for
example to use "ovs-vsctl del-br" to delete a bridge that points to the
same Port records that some other Bridge record also does.  This commit
makes that possible again, by implementing a compromise:

    * Internally, ovs-vsctl deletes the records that it believes should be
      deleted.

    * ovsdb-idl suppresses the deletions when it makes the RPC call into
      the database server.

Bug #5358.
Reported-by: Henrik Amren <henrik@nicira.com>
13 years agodebian: Do not call obsolete command "ovs-ofctl status" in ovs-bugtool.
Ben Pfaff [Tue, 12 Apr 2011 17:02:40 +0000 (10:02 -0700)]
debian: Do not call obsolete command "ovs-ofctl status" in ovs-bugtool.

This command was removed in commit 9b45d7f5d (ofproto: Get rid of archaic
"switch status" OpenFlow extension) but I didn't notice that ovs-bugtool
uses that command and forgot to remove it at the time.

Bug #5360.
Reported-by: Michael Mao <mmao@nicira.com>
Reported-by: Keith Amidon <keith@nicira.com>
13 years agopcap: Silence warnings about fwrite(3) return value being ignored.
Andrew Evans [Tue, 12 Apr 2011 17:40:15 +0000 (10:40 -0700)]
pcap: Silence warnings about fwrite(3) return value being ignored.

13 years agobridge: Monitor fewer OVSDB columns.
Ben Pfaff [Wed, 30 Mar 2011 00:05:52 +0000 (17:05 -0700)]
bridge: Monitor fewer OVSDB columns.

By omitting columns that ovs-vswitchd does not use at all, and omitting
alerts for columns that ovs-vswitchd writes to but does not read, we can
save CPU time and bandwidth.

13 years agoovsdb-idl: Fix atomicity of writes that don't change a column's value.
Ben Pfaff [Fri, 1 Apr 2011 17:50:52 +0000 (10:50 -0700)]
ovsdb-idl: Fix atomicity of writes that don't change a column's value.

The existing ovsdb_idl_txn_commit() drops any writes that don't change a
column's value from what was last reported by the database.  But this isn't
a valid optimization, because it breaks the atomicity of transactions.
Suppose columns A and B initially have values 1 and 2.  Client 1 writes
value 1 to both columns in one transaction.  Client 2 writes value 2 to
both columns in another transaction.  The only possible valid results for
any serial ordering of transactions are 1,1 or 2,2.  But if both clients
drop writes to columns that they have not modified, then 2,1 also becomes
possible (because client 1 just writes to B and client 2 just writes to A).

However, for write-only columns we can optimize this out because the IDL
can assume it is the only client writing to a column.

Found by inspection.

13 years agodaemon: Avoid races on pidfile creation.
Ben Pfaff [Mon, 4 Apr 2011 17:59:19 +0000 (10:59 -0700)]
daemon: Avoid races on pidfile creation.

Until now, if two copies of one OVS daemon started up at the same time,
then due to races in pidfile creation it was possible for both of them to
start successfully, instead of just one.  This was made worse when a
previous copy of the daemon had died abruptly, leaving a stale pidfile.

This commit implements a new pidfile creation and removal protocol that I
believe closes these races.  Now, a pidfile is asserted with "link" instead
of "rename", which prevents the race on creation, and a stale pidfile may
only be deleted by a process after it has taken a lock on it.

This may solve mysterious problems seen occasionally on vswitch restart.
I'm still puzzled by these problems, however, because I don't see anything
in our tests cases that would actually cause two copies of a daemon to
start at the same time, which as far as I can see is a necessary
precondition for the problem.

13 years agodaemon: Integrate checking for an existing pidfile into daemonize_start().
Ben Pfaff [Thu, 31 Mar 2011 16:44:30 +0000 (09:44 -0700)]
daemon: Integrate checking for an existing pidfile into daemonize_start().

Until now, it has been the responsibility of an individual daemon to call
die_if_already_running() at an appropriate time.  A long time ago, this
had to happen *before* daemonizing, because once the process daemonized
itself there was no way to report failure to the process that originally
started the daemon.  With the introduction of daemonize_start(), this is
now possible, but we haven't been taking advantage of it.

Therefore, this commit integrates the die_if_already_running() call into
daemonize_start() and deletes the calls to it from individual daemons.

13 years agodaemon: Tolerate EINTR in fork_and_wait_for_startup().
Ben Pfaff [Thu, 31 Mar 2011 16:36:10 +0000 (09:36 -0700)]
daemon: Tolerate EINTR in fork_and_wait_for_startup().

It seems possible that a signal coming in at the wrong time could confuse
this code.  It's always best to loop on EINTR.

13 years agoLog anything that could prevent a daemon from starting.
Ben Pfaff [Thu, 31 Mar 2011 23:23:50 +0000 (16:23 -0700)]
Log anything that could prevent a daemon from starting.

If a daemon doesn't start, we need to know why.  Being able to
consistently consult the log to find out is helpful.

13 years agoutil: New function ovs_fatal_valist().
Ben Pfaff [Thu, 31 Mar 2011 21:50:58 +0000 (14:50 -0700)]
util: New function ovs_fatal_valist().

This commit adds a few initial users but more are coming up.

13 years agosignals: New function signal_name().
Ben Pfaff [Fri, 1 Apr 2011 17:22:51 +0000 (10:22 -0700)]
signals: New function signal_name().

This will acquire a new user in an upcoming commit.

13 years agotype-props: New macro for estimating length of a decimal integer.
Ben Pfaff [Fri, 1 Apr 2011 17:20:17 +0000 (10:20 -0700)]
type-props: New macro for estimating length of a decimal integer.

13 years agodpif-linux: Avoid logging error on ENOENT in dpif_linux_is_internal_device().
Ben Pfaff [Fri, 8 Apr 2011 23:38:42 +0000 (16:38 -0700)]
dpif-linux: Avoid logging error on ENOENT in dpif_linux_is_internal_device().

ENOENT can be returned if the kernel module isn't loaded.  If that's the
case then we've already logged that and there's no point in logging it
again.

13 years agodpif-linux: Avoid segfault on netdev_get_stats() without kernel module.
Ben Pfaff [Fri, 8 Apr 2011 23:37:22 +0000 (16:37 -0700)]
dpif-linux: Avoid segfault on netdev_get_stats() without kernel module.

netdev_linux_get_stats() calls into netdev_vport_get_stats(), which in
turn attempts a transaction on genl_sock.  If the kernel module isn't
loaded, then genl_sock won't be there, and in any case there's nothing that
guarantees that it's been initialized yet.

This fixes the problem by ensuring that dpif_linux was initialized properly
before attempting a transaction on genl_sock.

Reported-by: Aaron Rosen <arosen@clemson.edu>
13 years agovswitch: Improve schema documentation.
Ben Pfaff [Tue, 29 Mar 2011 16:30:04 +0000 (09:30 -0700)]
vswitch: Improve schema documentation.

13 years agocfm: Fix broken fault logic. v1.1.0
Ethan Jackson [Thu, 7 Apr 2011 00:23:40 +0000 (17:23 -0700)]
cfm: Fix broken fault logic.

If the last receive time for a remote MP was before the last fault
check, the CFM code would not declare a fault.  This is, of course,
exactly the wrong response.

Bug #5303.

13 years agobridge: Run once before configuring CFM.
Ethan Jackson [Wed, 6 Apr 2011 23:59:22 +0000 (16:59 -0700)]
bridge: Run once before configuring CFM.

CFM configuration requires the ofproto_run function to have been
executed at least once in order to guarantee that the relevant
ports exist.

Bug #5303.

13 years agoRelease Open vSwitch 1.1.0
Justin Pettit [Wed, 6 Apr 2011 05:17:03 +0000 (22:17 -0700)]
Release Open vSwitch 1.1.0

13 years agoUpdate top-level documentation to bring it up to date with latest features.
Ben Pfaff [Wed, 6 Apr 2011 16:15:58 +0000 (09:15 -0700)]
Update top-level documentation to bring it up to date with latest features.

13 years agodpif-linux: Choose port numbers more prudently.
Ethan Jackson [Mon, 4 Apr 2011 23:55:34 +0000 (16:55 -0700)]
dpif-linux: Choose port numbers more prudently.

Before this patch the kernel chose the lowest available number for
newly created datapath ports.  This patch moves the port number
choosing responsibility to user space, and implements a least
recently used port number queue in an attempt to avoid reuse.

Bug #2140.

13 years agoxenserver: Fix up iface-id after it changes or disappears too.
Ben Pfaff [Fri, 1 Apr 2011 20:47:51 +0000 (13:47 -0700)]
xenserver: Fix up iface-id after it changes or disappears too.

ovs-xapi-sync is supposed to always keep external-ids:iface-id up to date,
but in fact it would only set it when an interface initially appeared.  If
the interface quickly disappeared and reappeared, then it failed to notice
that iface-id had changed or disappeared.  This happens in practice on
Citrix XenServer, where VM "tap" devices often disappear and then reappear
almost immediately during VM boot.  This commit fixes the problem.

This also fixes the similar problem for external-ids:bridge-id in Bridge
records.  Bridges aren't ordinarily destroyed and re-created quickly, so
this problem might never have manifested in practice for bridges.

Many thanks to Reid Price <reid@nicira.com> for identifying the problem
and supplying an initial fix.

Bug #5239.
Reported-by: Henrik Amren <henrik@nicira.com>
13 years agoovsdb-server: Avoid intermittent test failures due to lockfile log message.
Ben Pfaff [Fri, 1 Apr 2011 22:46:22 +0000 (15:46 -0700)]
ovsdb-server: Avoid intermittent test failures due to lockfile log message.

Sometimes lockfile will emit a message saying that it took a little while
to get the lock, which caused spurious test failures.  This commit
suppresses the message.  With this change, I was able to run these tests
continuously for some time without failures.

This was a bug in the testsuite, not in the code under test.

13 years agocfm: Allow time for CCM reception after cfm_configure();
Ethan Jackson [Fri, 1 Apr 2011 20:10:49 +0000 (13:10 -0700)]
cfm: Allow time for CCM reception after cfm_configure();

Before this (and the previous) patch, whenever cfm_configure was
called it would set the fault_timer to expired.  Thus, the next
call to cfm_run would notice a lack of CCM reception and trigger a
faulted status.  This is a bug in and of itself, but normally would
not be a big deal because cfm_configure should only be called
infrequently (when the database changes).  However due to an
unrelated bug, cfm_configure() was getting called approximately once
per second.  This resulted in all monitors showing faults all of
the time.

This patch fixes the problem by not expiring the timer at
cfm_configure().  Instead it gives it the appropriate
fault_interval amount of time to miss heartbeats.

Bug #5244.

13 years agocfm: cfm_configure() only update when necessary.
Ethan Jackson [Fri, 1 Apr 2011 20:22:44 +0000 (13:22 -0700)]
cfm: cfm_configure() only update when necessary.

Calling cfm_configure often could cause timers to be reset
resulting in unexpected behavior.  This commit only updates when
cfm configuration actually changed.

Bug #5244.

13 years agoovsdb: Truncate bad transactions from database log.
Ben Pfaff [Mon, 28 Mar 2011 20:05:40 +0000 (13:05 -0700)]
ovsdb: Truncate bad transactions from database log.

When ovsdb-server reads a database file that is corrupted at the
transaction level (that is, the transaction is valid JSON and has the
correct SHA-1 hash, but it does not describe a valid database transaction),
then ovsdb-server should truncate it and overwrite it by valid
transactions.  However, until now, it didn't.  Instead, it would keep the
invalid transaction and possibly every transaction in the database file
(depending on in what way the transaction was invalid), which would just
cause the same trouble again the next time the database was read.

This fixes the problem.  An invalid transaction will be deleted from the
database file at the first write to the database.

Bug #5144.
Bug #5149.

13 years agoovsdb: Check that ovsdb-server truncates corrupted database logs.
Ben Pfaff [Mon, 28 Mar 2011 19:57:20 +0000 (12:57 -0700)]
ovsdb: Check that ovsdb-server truncates corrupted database logs.

When ovsdb-server reads a database that is corrupted at the log level
(that is, when ovsdb_log detects the corruption by checking the SHA-1 hash
of the record or JSON parser error reporting), then writing to the database
should discard the corrupted data and thereby fix the problem for future
ovsdb-server runs.

This already worked OK.  This just adds an extra test.

13 years agoovsdb: Raise database corruption log level from warning to error.
Ben Pfaff [Mon, 28 Mar 2011 19:59:18 +0000 (12:59 -0700)]
ovsdb: Raise database corruption log level from warning to error.

If there's database corruption then it indicates that something went wrong,
e.g. the machine was powered-off by power failure.  It's definitely
something that the admin should know about.  This sounds like an error to
me, so use that log level.

13 years agoovsdb: Force strong references to non-root tables to be persistent.
Ben Pfaff [Thu, 31 Mar 2011 23:43:43 +0000 (16:43 -0700)]
ovsdb: Force strong references to non-root tables to be persistent.

When a strong reference to a non-root table is ephemeral, the database log
can contain inconsistencies.  In particular, if the column in question is
the only reference to a row, then the row will be created in one logged
transaction but the reference to it will not be logged (because it is
ephemeral).  Thus, any later occurrence of the row later in the log (to
modify it, to delete it, or just to reference it) will yield a transaction
error and reading the database will abort at that point.

This commit fixes the problem by forcing any column with a strong reference
to a non-root table to be persistent.

The change to ovsdb_schema_from_json() looks bigger than it really is: it
just swaps the order of two operations on the schema and updates their
comments.  Similarly for the update to ovs.db.DbSchema.__init__().

Bug #5144.
Reported-by: Sujatha Sumanth <ssumanth@nicira.com>
Bug #5149.
Reported-by: Ram Jothikumar <rjothikumar@nicira.com>
13 years agoovsdb-types: Fix bug in ovsdb_base_type_is_ref().
Ben Pfaff [Mon, 28 Mar 2011 17:48:36 +0000 (10:48 -0700)]
ovsdb-types: Fix bug in ovsdb_base_type_is_ref().

This function only worked properly inside OVSDB itself, because that is
the only place where the 'refTable' member of ovsdb_base_type is set.
Both inside and outside OVSDB, 'refTableName' is set for reference types,
so it's better to check for that.

This doesn't fix any existing bug because this function was only used
inside OVSDB until now.

13 years agoovs-brcompatd: Convert svecs to ssets.
Ben Pfaff [Fri, 25 Mar 2011 22:21:18 +0000 (15:21 -0700)]
ovs-brcompatd: Convert svecs to ssets.

13 years agobridge: Convert svecs to ssets.
Ben Pfaff [Fri, 25 Mar 2011 22:15:33 +0000 (15:15 -0700)]
bridge: Convert svecs to ssets.

13 years agoovs-openflowd: Use sset in place of svec.
Ben Pfaff [Fri, 25 Mar 2011 22:11:05 +0000 (15:11 -0700)]
ovs-openflowd: Use sset in place of svec.

Also deletes svec_split() since this was the only user.

13 years agoofproto: Change string sets in interface from svec to sset.
Ben Pfaff [Fri, 25 Mar 2011 22:04:12 +0000 (15:04 -0700)]
ofproto: Change string sets in interface from svec to sset.

13 years agoovsdb-parser: Use sset instead of svec for detecting unused members.
Ben Pfaff [Fri, 25 Mar 2011 20:20:35 +0000 (13:20 -0700)]
ovsdb-parser: Use sset instead of svec for detecting unused members.

Should be slightly cheaper than sorting a list (O(n) vs. O(n lg n)).

13 years agonetdev: Use sset instead of svec in netdev interface.
Ben Pfaff [Fri, 25 Mar 2011 20:04:47 +0000 (13:04 -0700)]
netdev: Use sset instead of svec in netdev interface.