Ben Pfaff [Fri, 29 May 2009 22:15:53 +0000 (15:15 -0700)]
xenserver: Put XenServer network UUIDs into ovs-vswitchd.conf.
vNetManager needs the UUIDs of the XenServer networks represented by a
bridge. interface-reconfigure has all the necessary information to figure
this out, so make it add them to the configuration file.
Ben Pfaff [Thu, 28 May 2009 21:50:54 +0000 (14:50 -0700)]
xenserver: Keep Centos network config files up-to-date even with vswitch.
When the vswitch is running, it doesn't care about, doesn't need, and
doesn't use the files in /etc/sysconfig/network-scripts. But if you ever
remove the vswitch (e.g. "rpm -e vswitch") then the regular bridge code
does need them. There is no guarantee that we will be able to get access
to the xapi database at "rpm -e" time, so it is better to keep these
configuration files up-to-date after each operation. This commit does
that.
Given that we keep these files up-to-date after each operation now, there
is no need to call interface-reconfigure at RPM uninstall time, so this
commit also removes the script code that did that.
Ben Pfaff [Thu, 28 May 2009 21:38:17 +0000 (14:38 -0700)]
xenserver: Create xapi database cache in RPM preinstall step.
Until now, the RPM package for XenServer only attempted to save the xapi
database cache during the reboot process (from
/etc/init.d/management-interface), which happened well after the vswitch
was actually installed. This meant that if connectivity to xapi was busted
at reboot time, or even just if the machine was rebooted with the reset
button instead of through a graceful reboot sequence, then the machine
would fail to come up and there would be no way to fix it without removing
the vswitch.
This commit fixes the problem by writing out the xapi database cache before
package installation and aborting the install if the operation fails.
Ben Pfaff [Wed, 27 May 2009 18:46:20 +0000 (11:46 -0700)]
datapath: Avoid bad array reference for missing group in ODPAT_OUTPUT_GROUP.
When ODPAT_OUTPUT_GROUP referenced a group that hadn't been created,
output_group() would return a negative number other than -1.
execute_actions() would pass this later to do_output(), which would then
use it as a bogus array index, accessing invalid memory.
This commit fixes it by making it return -1 instead, which the caller
interprets correctly.
Thanks to Justin for leading me to scrutinize this code.
Ben Pfaff [Wed, 27 May 2009 18:37:08 +0000 (11:37 -0700)]
datapath: Avoid double-free on skb_clone failure in ODPAT_OUTPUT_GROUP.
output_group() has no business freeing the skb passed into it, but it was
doing so in case of allocation failure. Since execute_actions() would
also later free it, this was a serious error.
Thanks to Justin for pointing out the problem.
Ben Pfaff [Wed, 27 May 2009 16:09:54 +0000 (09:09 -0700)]
datapath: Fix read of uninitialized data.
Control jumps to the error_free_flow label to free a flow allocated with
kmem_cache_alloc(), but the sf_acts member of that flow has never been
initialized and thus flow_free() will pass uninitialized data to kfree().
Fix it by just freeing the flow itself.
Ben Pfaff [Tue, 26 May 2009 17:44:43 +0000 (10:44 -0700)]
secchan: Disallow port numbers not supported by datapath.
The OpenFlow protocol supports port numbers from 0 to 0xff00.
The datapath protocol supports port numbers from 0 to 0x100.
The datapath will reject port numbers in the range 0x100 to 0xff00, but the
secchan was not screening these out. Thus, attempting to add a flow or
send a packet to one of these ports would result in a kernel EINVAL error,
instead of a more sensible OpenFlow error. This commit remedies the
situation.
Thanks to Justin for pointing out the issue.
Ben Pfaff [Tue, 26 May 2009 17:40:09 +0000 (10:40 -0700)]
datapath: Fix return value when ODP_FLOW_PUT fails to allocate a flow.
Noticed by Justin.
Ben Pfaff [Tue, 26 May 2009 17:36:53 +0000 (10:36 -0700)]
secchan: Do not refresh datapath indexes from bridge_get_ifaces().
bridge_get_ifaces() called bridge_fetch_dp_ifaces(), which in turn would
set dp_ifidx members of struct iface to -1 if we were racing with a port
being deleted from a datapath. When this happen it would cause
ODPAT_OUTPUT actions with the port number set to UINT16_MAX to be pushed
to the datapath on OFPP_NORMAL actions, which the datapath would choke
on with EINVAL errors.
Thanks to Justin for pointing out the bad actions being pushed to the
datapath.
Ben Pfaff [Thu, 21 May 2009 20:25:40 +0000 (13:25 -0700)]
xenserver: Remove bridge configuration files when they become stale.
interface-reconfigure communicates with the vif script using files in
/etc/openvswitch, but it didn't delete them when they were stale. This
commit fixes the problem.
Ben Pfaff [Thu, 21 May 2009 20:17:49 +0000 (13:17 -0700)]
xenserver: Fix file name conflict.
Our xenserver scripts were attempting to use /etc/sysconfig/vswitch for
two different purposes: as both a file and a directory. Move one of them.
Ben Pfaff [Thu, 21 May 2009 19:49:04 +0000 (12:49 -0700)]
cfg: Fix typo in comment.
Ben Pfaff [Mon, 18 May 2009 22:31:59 +0000 (15:31 -0700)]
xenserver: Delete port ingress policing settings when adding vif.
When we add a new vif, we should not retain any prior ingress policing
settings from previous incarnations of a vif with the given name.
Bug #1328.
Ben Pfaff [Mon, 18 May 2009 22:29:45 +0000 (15:29 -0700)]
xenserver: Only require confirmation for "vswitch restart" if interactive.
When /etc/init.d/vswitch restart is invoked non-interactively (e.g. from
a cron job), don't require interactive confirmation. Not that we should
encourage such behavior, but this approach seems closer to what most Unix
utilities do in similar situations.
Ben Pfaff [Mon, 18 May 2009 22:32:20 +0000 (15:32 -0700)]
xenserver: Remove now-unsupported commands from /etc/init.d/vswitch.
The "unload" and "update-modules" commands for /etc/init.d/vswitch were
based on the files in /etc/sysconfig/network-scripts. The current
implementation of interface-reconfigure no longer updates those files, so
these commands would no longer work reliably. Worse, they would work
*sometimes* but not other times, so it's better not to offer them at all.
It might make sense to reimplement these, if they are useful enough.
Ben Pfaff [Thu, 21 May 2009 19:40:05 +0000 (12:40 -0700)]
Rename vswitchd to ovs-vswitchd, for consistency.
Ben Pfaff [Sat, 16 May 2009 00:19:35 +0000 (17:19 -0700)]
Rename brcompatd to ovs-brcompatd, for consistency.
Ben Pfaff [Thu, 21 May 2009 18:18:34 +0000 (11:18 -0700)]
datapath: Disable TX on internal ports before removing.
This is a partial fix for a more pervasive problem, that destroying a
dp_dev races with its transmit work function (dp_dev_do_xmit) running.
A "better" and "correct" fix has been written, but unfortunately it seems
to be buggy and crash the system so far.
Ben Pfaff [Thu, 21 May 2009 18:11:08 +0000 (11:11 -0700)]
xenserver: Make vif script log its changes to vswitchd.conf.
This makes debugging easier.
Ben Pfaff [Thu, 21 May 2009 18:10:19 +0000 (11:10 -0700)]
brcompat refactoring fixes
Ben Pfaff [Wed, 20 May 2009 23:18:45 +0000 (16:18 -0700)]
xenserver: Fix VLANs on virtual interfaces.
Ben Pfaff [Wed, 20 May 2009 21:57:06 +0000 (14:57 -0700)]
xenserver: Fix use of VLAN as primary management interface.
xapi insists that the device that carries the IP address for a VLAN is
the bridge that it thinks the VLAN is on. This commit makes it so.
xapi also will do the ioctl equivalent of "brctl addbr xapi#" if that
bridge appears to be missing when it reconfigures the interface. If we
return EEXIST or any other error, then it gives up at that point. So we
have to return "success" to that attempt regardless of whether we really
want to do so.
Ben Pfaff [Tue, 19 May 2009 16:45:41 +0000 (09:45 -0700)]
Revert "xenserver: Make primary management interface on VLAN possible."
This reverts commit
d71cb7eb3e52fbf521abe6d0cb19cc8b7aea80dc.
The strategy used in that commit for making the primary management
interface on a VLAN possible did not work reliably. Sometimes it would
work for a time, but eventually xapi would start listening only on the IP
address attached to the fake VLAN bridge. Since this is not a real IP
address that can be used to talk to the outside world (and in any case it
isn't the IP address requested by the administrator) xapi would become
unreachable at this point.
Ben Pfaff [Thu, 21 May 2009 16:31:11 +0000 (09:31 -0700)]
brcompat: Move more brcompat implementation into userspace.
Until now, the brcompat kernel module has had to do more of the work of
simulating a bridge than is ideal, because brcompatd was not able to find
out when the vswitchd had finished reloading. It is important that the
bridge reconfiguration be complete by the time that the bridge ioctl
returns, so this had to be done from the kernel.
Now it is possible for brcompatd to wait for the reload to finish (by
using the equivalent of "ovs-appctl -e vswitchd/reload") so this part of
the work can be done in userspace. This commit moves it there.
This commit also moves to userspace some error-checking work, in particular
checking whether a bridge or a port operation is correct. This is
important for an upcoming commit, where brcompatd wishes to send a fake
success return value for an operation that must be ignored. When the error
checking is done in the kernel, it defeats this purpose.
Ben Pfaff [Wed, 20 May 2009 21:43:49 +0000 (14:43 -0700)]
dirs: Add variable for bindir.
brcompatd wants to use this in an upcoming commit.
Ben Pfaff [Wed, 20 May 2009 21:32:42 +0000 (14:32 -0700)]
cfg: Add new function cfg_is_dirty().
Justin Pettit [Thu, 21 May 2009 05:46:29 +0000 (22:46 -0700)]
Change project name to "Open vSwitch"
The project was most recently called "OpenVSwitch". This commit changes
the name to "Open vSwitch", which should be the official name (and
capitalization) going forward.
Justin Pettit [Thu, 21 May 2009 05:18:37 +0000 (22:18 -0700)]
Modify version string for various binaries.
For applications that understand OpenFlow, print the versions they
support. This change also adds that the program is part of the Open
vSwitch project.
Add support for the "--version" argument to some programs that were
missing it.
Justin Pettit [Thu, 21 May 2009 03:57:47 +0000 (20:57 -0700)]
xenserver: Fix typo in description of RPM spec file
Corrects the spelling of "bridging" in the description of the RPM spec
file.
Ben Pfaff [Tue, 19 May 2009 22:37:10 +0000 (15:37 -0700)]
Remove vestigial SNAT support.
Ben Pfaff [Tue, 19 May 2009 21:01:55 +0000 (14:01 -0700)]
brcompatd: Improve error message.
When there are no non-option arguments, "config file is only non-option
argument" is a confusing message, so make it more generic.
Ben Pfaff [Wed, 20 May 2009 19:34:41 +0000 (12:34 -0700)]
lib/automake.mk: Fix odd typo that apparently did no damage.
$(pkgdatadir$) apparently expands exactly the same way as $(pkgdatadir),
at least under GNU make, but it's obviously wrong.
Ben Pfaff [Tue, 19 May 2009 00:02:58 +0000 (17:02 -0700)]
hash: Add unit test.
Ben Pfaff [Tue, 19 May 2009 00:04:27 +0000 (17:04 -0700)]
tests: Ignore test binaries.
Ben Pfaff [Wed, 20 May 2009 16:17:04 +0000 (09:17 -0700)]
ovs-pki: Fix bashism.
Thanks to Nicolas Perrenoud <nicolape@ee.ethz.ch> for reporting the
problem.
Justin Pettit [Wed, 20 May 2009 01:01:49 +0000 (18:01 -0700)]
xenserver: Fix setting pool-wide controller setting
The latest set of changes left out pushing the controller configuration
changes out to members of the pool. This patch adds back the call to do
that.
Justin Pettit [Tue, 19 May 2009 00:08:47 +0000 (17:08 -0700)]
xen: Fix a missed xapi plugin from the Nicira brand stripping
Missed a xapi plugin during the rebranding. This adds that and fixes a
couple of case-senstive variable issues. Ugh, need to figure out how to
make local Xen RPM builds...
Justin Pettit [Mon, 18 May 2009 23:31:27 +0000 (16:31 -0700)]
xen: Add missing change to Nicira brand removal commit
Also need to update the makefile!
Justin Pettit [Mon, 18 May 2009 23:22:40 +0000 (16:22 -0700)]
xen: Remove Nicira branding from vSwitch xsconsole plugin
Since the plan is to eventually integrate this code into the Xen
distribution, the Nicira tags have been removed. The copyright is still
held by Nicira until a better one is found.
Jesse Gross [Mon, 18 May 2009 22:41:11 +0000 (15:41 -0700)]
brcompatd: Fix type in brcompatd man page.
Ben Pfaff [Mon, 18 May 2009 20:43:45 +0000 (13:43 -0700)]
xenserver: Drop unused variable.
Ben Pfaff [Mon, 18 May 2009 20:31:00 +0000 (13:31 -0700)]
xenserver: Fix missing default route problem.
Taking down the vlan_slave's network device deletes any routes associated
with it, including the default route, and those routes are not restored
when the network device is brought up again later.
So don't take that device down at all. There's no reason to do so.
We still want to bring that device up after configuring the pif, just in
case it was down, so this commit only deletes the down_netdev, not the
corresponding up_netdev later on.
Second half of bug #1327.
Ben Pfaff [Mon, 18 May 2009 20:15:28 +0000 (13:15 -0700)]
xenserver: Choose correct management PIF even with --force.
The --force option was failing to choose the management PIF based on
the "management" PIF field. This commit fixes the problem.
This is a partial fix for bug #1327.
Ben Pfaff [Mon, 18 May 2009 19:23:39 +0000 (12:23 -0700)]
xenserver: Delete code unneeded for openvswitch.
openvswitch doesn't care about the ordering here.
Ben Pfaff [Mon, 18 May 2009 19:23:03 +0000 (12:23 -0700)]
xenserver: Make primary management interface on VLAN possible.
Before xapi puts the primary management interface on a new PIF, it verifies
that the PIF's network device exists and has an IP address. For physical
PIFs and for bonds, this works fine. For VLANs, the openvswitch does not
put the IP address on the network device that xapi expects, but on a
different network device (e.g. openvswitch puts it on eth0.X instead of on
xapiY), so this checks fails with the message "The specified interface
cannot be used because it has no IP address".
This commit makes interface-reconfigure "fake out" xapi by putting a
dummy IP address on the xapi# interface.
Bug #1325.
Justin Pettit [Mon, 18 May 2009 15:49:45 +0000 (08:49 -0700)]
xen: Fix permission on xsconsole plugin
Not sure why the file permissions on the xsconsole plugin changed, but
this reverts them back.
Justin Pettit [Mon, 18 May 2009 15:45:56 +0000 (08:45 -0700)]
xen: xsconsole plugin cleanup based on Citrix feedback
Various cleanups to the vSwitch plugin for xsconsole based on feedback
from Citrix. The changes include a cleaner way to pop-up temporary
messages, leaving a success or failure box after performing an action,
and safer subprocess calling.
Ben Pfaff [Fri, 15 May 2009 23:56:33 +0000 (16:56 -0700)]
ovs-dpctl: Rename commands for consistency.
Ben Pfaff [Fri, 15 May 2009 22:57:53 +0000 (15:57 -0700)]
ovs-dpctl: Remove get-idx and get-name commands.
These commands made some sense when dpctl only accepted numerical datapath
identifiers, but now it accepts names as well as numbers. These commands
were never really used much, so delete them.
Ben Pfaff [Fri, 15 May 2009 22:48:58 +0000 (15:48 -0700)]
Break dpctl into two programs: ovs-ofctl and ovs-dpctl.
The datapath and OpenFlow are fairly different and it seems wrong
conceptually to work with both in a single program. So this commit breaks
them up into two programs.
Ben Pfaff [Fri, 15 May 2009 20:18:46 +0000 (13:18 -0700)]
xenserver: Fix package build.
Ben Pfaff [Fri, 15 May 2009 19:59:35 +0000 (12:59 -0700)]
ovs-cfg-mod: Accept -v option before any targets are specified.
Setting the log levels should be allowed before specifying targets, but it
wasn't. This fixes it.
This fixes a failure to bring up network interfaces at boot (and at any
other time too).
Ben Pfaff [Fri, 15 May 2009 19:40:05 +0000 (12:40 -0700)]
Rename vlogconf to ovs-appctl, for consistency and as a better name.
The vlogconf program at one time only affected log levels. Now, it can do
more, and probably will be expanded in the future, so appctl is a better
name.
Ben Pfaff [Fri, 15 May 2009 18:16:52 +0000 (11:16 -0700)]
Rename cfg-mod to ovs-cfg-mod, for consistency.
Ben Pfaff [Fri, 15 May 2009 18:14:39 +0000 (11:14 -0700)]
xenserver: Fix path to invoke cfg-mod utility when removing a vif.
It's possible that this fixes a real bug.
Ben Pfaff [Fri, 15 May 2009 18:08:03 +0000 (11:08 -0700)]
Drop stray references to udatapath, which doesn't exist any longer.
Ben Pfaff [Fri, 15 May 2009 18:02:08 +0000 (11:02 -0700)]
Rename "controller" to "ovs-controller" and move to utilities.
The controller is unimportant and we don't want people thinking that it is
important. (They should be using NOX, not the OpenVSwitch controller.)
So kill off its top-level directory.
Justin Pettit [Fri, 15 May 2009 01:11:57 +0000 (18:11 -0700)]
netflow: Set Engine and Add Alternate Port ID Flag
Allow the Engine Type and Engine ID to be configured in NetFlow
messages. Previously, they were always set to zero. Now, by default,
they are both set to the datapath index. These can be overridden with
the "netflow.bridge.engine-type" and "netflow.bridge.engine-id" keys,
respectively.
Add the ability to allow collectors to distinguish between virtual
switches sending message from the host. When the
"netflow.bridge.add-id-to-iface" flag is enabled, the least significant
7 bits of the engine id are placed into the most significant bits of
the ingress and egress interface fields of flow records. This
mimics the behavior of VMware ESX when the "-p" option is given to the
NetFlow configuration program.
(Addresses Bug #1222 and Bug #1223)
Justin Pettit [Thu, 14 May 2009 23:21:03 +0000 (16:21 -0700)]
netflow: Document 1400-byte packet length limit.
The NetFlow code accumulates records until the packet is 1400 bytes or
some amount of time has passed. This just adds a comment that NetFlow
messages are limited to 30 records, which places a ceiling on how large
the message can be (1400 is below that ceiling).
Justin Pettit [Thu, 14 May 2009 22:07:03 +0000 (15:07 -0700)]
vswitch: reduce passes through config loop
When vswitchd configures itself, it loops through the bridges to pull
relevant configuration information from vswitchd.conf. Configuration
for determining the dpid, controller, and NetFlow was inside a loop for
configuring a bridge's interfaces. This meant that these configuration
parameters were being re-set for each interface in the bridge as opposed
to just once for the bridge. This change pushes this configuration
outside of that interface loop. The LIST_FOR_EACH_SAFE macro to loop
through the bridges is switched to LIST_FOR_EACH, since bridges are not
deleted in this loop.
Ben Pfaff [Thu, 14 May 2009 23:25:12 +0000 (16:25 -0700)]
netflow: Report largest possible value when counters exceed 32 bits.
secchan tracks packets and bytes using 64-bit counters, but the
corresponding NetFlow v5 fields are only 32 bits wide. Until now we would
just report the lower 32 bits on overflow; this commit changes the
behavior to reporting 0xffffffff instead.
Bug #1316.
Ben Pfaff [Thu, 14 May 2009 23:13:30 +0000 (16:13 -0700)]
xenserver: Avoid printing log messages to the console from scripts.
Log messages from cfg-mode tended to overwrite random bits of the xsconsole
screen.
Bug #1315.
Ben Pfaff [Thu, 14 May 2009 22:35:47 +0000 (15:35 -0700)]
brcompatd: Fix typo in previous commit.
Ben Pfaff [Thu, 14 May 2009 22:31:15 +0000 (15:31 -0700)]
brcompatd: Don't remove nonexistent ports if vswitchd will create them.
There is a race between brcompatd and vswitchd for internal ports, e.g.
in this scenario:
1. cfg-mod adds "bridge.xenbr0.port=xenbr0".
2. vswitchd creates xenbr0.
we can have brcompatd slip in between them:
2.5. brcompatd notices that there is no network device xenbr0
and deletes the new line from the config file.
For the local port and other internal ports we don't want brcompatd
interfering, so this commit makes it ignore them.
Bug #1314.
Ben Pfaff [Thu, 14 May 2009 21:06:08 +0000 (14:06 -0700)]
Get rid of vswitchext entirely.
Ben Pfaff [Thu, 14 May 2009 20:39:12 +0000 (13:39 -0700)]
Move watchdog timer utility from vswitchext to openvswitch.
Ben Pfaff [Thu, 14 May 2009 20:19:58 +0000 (13:19 -0700)]
Move ovs-monitor script from vswitchext to openvswitch.
Ben Pfaff [Thu, 14 May 2009 19:53:10 +0000 (12:53 -0700)]
Add configure option --disable-userspace for building kernel modules only.
Ben Pfaff [Thu, 14 May 2009 19:33:34 +0000 (12:33 -0700)]
vswitch: Give up hope that the config file delimiter will be changed.
This code originally assumed that it could iterate over all the subsections
of "port" in the configuration file to obtain the names of network devices,
but this didn't work because "." is both the configuration file section
delimiter and a valid (and fairly common) character in network device
names. So it was changed to use a different technique with the hope that
the original code could be restored when the configuration file syntax was
changed.
Now we've agreed that the configuration file syntax is not going to change
before we change to a different configuration model entirely, so this
commit deletes the original code (which was #if'd out, not deleted).
Another reason to do this is to kill off some warnings due to unused
functions and variables.
Ben Pfaff [Thu, 14 May 2009 19:25:26 +0000 (12:25 -0700)]
Delete OpenFlow management spec.
Although this spec was canonical, it was inaccurate and we plan to replace
it by netconf anyhow.
Ben Pfaff [Thu, 14 May 2009 19:24:43 +0000 (12:24 -0700)]
Delete OpenFlow spec.
The openvswitch tree is not the canonical source of the OpenFlow spec.
Get it from openflowswitch.org instead.
Ben Pfaff [Thu, 14 May 2009 18:22:01 +0000 (11:22 -0700)]
Revert "Apply temporary band-aid to VLAN-related OOPS on XenServer."
This reverts commit
ef4a656e73b3bf157519a8f6e239c0e5f54600a3,
since the need for it was eliminated (I hope).
Ben Pfaff [Thu, 14 May 2009 18:20:10 +0000 (11:20 -0700)]
datapath: Fix VLAN-related kernel OOPS on XenServer.
In deleting internal ports (other than the local port) we were failing to
call dp_del_if_hook even though we had called dp_add_if_hook when we added
it. This prevented the sysfs kobject from being released and caused the
wrong address to be passed to kfree. The former could cause random
memory corruption; the latter may be benign since the address was still in
the same slab object.
Ben Pfaff [Thu, 14 May 2009 16:08:20 +0000 (09:08 -0700)]
Apply temporary band-aid to VLAN-related OOPS on XenServer.
Now, VLAN devices will be disabled by default. To enable them, create a
file named /etc/vswitchd.enable-vlans.
This commit will be reverted when a real fix is available.
Ben Pfaff [Wed, 13 May 2009 22:11:37 +0000 (15:11 -0700)]
Move EZIO utilities from vswitchext into openvswitch.
Keith Amidon [Wed, 13 May 2009 21:48:42 +0000 (14:48 -0700)]
Fix for typo in warning message.
Ben Pfaff [Wed, 13 May 2009 21:17:09 +0000 (14:17 -0700)]
xenserver: Add comments describing open issues for interface-reconfigure.
Ben Pfaff [Wed, 13 May 2009 21:15:58 +0000 (14:15 -0700)]
xenserver: Fix --force up/down behavior in a resource pool.
The PIFs key of a network lists one PIF for each member of the pool, not
one PIF per bond or whatever I had in mind. So we need to iterate over
all the PIFs in the network and find the one for our current host.
Ben Pfaff [Wed, 13 May 2009 21:01:32 +0000 (14:01 -0700)]
Add support for Citrix XenServer.
This was previously in openflowext. Now we are adding it to openvswitch.
Ben Pfaff [Wed, 13 May 2009 19:14:46 +0000 (12:14 -0700)]
datapath: Fix build warnings and errors on Linux 2.6.15, 2.6.16, 2.6.17.
Ben Pfaff [Mon, 11 May 2009 21:26:44 +0000 (14:26 -0700)]
datapath: Add support for "internal" ports similar to the local port.
The datapath has supported a simulated "local port" for a long time, but it
has never been possible to create additional ports with the same
characteristics. One way to do this is using the veth driver, but this is
somewhat awkward, since there is no desire to create a pair of devices;
one suffices.
The immediate purpose for this feature is to allow an IP address to be put
on both a physical interface and a tagged VLAN attached to that interface
on Xen.
Justin Pettit [Wed, 13 May 2009 06:35:45 +0000 (23:35 -0700)]
Don't print warning about removing policy on startup.
The policing code attempts to delete any traffic control configuration on
startup, so that interfaces come up in a known state. If the interface
didn't have any traffic control configuration, this would cause it to
print a couple of scary sounding warning messages. This commit makes it
so those no longer print.
Justin Pettit [Wed, 13 May 2009 05:58:25 +0000 (22:58 -0700)]
Fix return value call on send() when sending NetFlow messages.
When sending NetFlow messages, we use the send() call, but were checking
the wrong return value. It would report an error when any non-zero
value was returned. The send() call returns the number of bytes sent or
-1 on error. Thus, whenever a NetFlow message was sent, it would
generate an error message. Now, we only log a message when a value of
-1 is returned. (Bug #1166)
Ben Pfaff [Thu, 7 May 2009 00:35:40 +0000 (17:35 -0700)]
datapath: Call rcu_barrier() before unloading module.
According to article "RCU and Unloadable Modules" available at lwn.net,
a module that uses RCU callbacks should call rcu_barrier() before
unloading, because synchronize_rcu() does not ensure that all RCU callbacks
have actually completed, only that a grace period has elapsed.
Ben Pfaff [Thu, 7 May 2009 00:14:37 +0000 (17:14 -0700)]
datapath: Always call dp_process_received_packet() with BHs disabled.
dp_process_received_packet() was assuming that bottom-halves were disabled,
but this was not true where it was called from dp_dev_do_xmit().
Allow, add comments documenting synchronization.
Ben Pfaff [Fri, 8 May 2009 18:24:58 +0000 (11:24 -0700)]
datapath: Omit sysfs-specific data when sysfs is not enabled or not supported.
This saves a few bytes of memory but it also makes it clear to the reader
what data is used for what.
Ben Pfaff [Tue, 5 May 2009 21:23:32 +0000 (14:23 -0700)]
datapath: Omit SNAT-specific data when SNAT is not enabled.
This saves a few bytes of memory but it also makes it clear to the reader
what data is used for what.
Ben Pfaff [Fri, 8 May 2009 17:46:19 +0000 (10:46 -0700)]
brcompatd: Log high-level actions and their results.
brcompatd did not log the addbr, delbr, addif, and delif actions that it
was taking. This commit adds that logging.
Ben Pfaff [Tue, 12 May 2009 20:48:26 +0000 (13:48 -0700)]
cfg-mod: Add --changes option for logging configuration changes.
This makes it a lot easier to see what actually changed.
Ben Pfaff [Tue, 12 May 2009 20:41:02 +0000 (13:41 -0700)]
cfg-mod: Make --query print all values, not just those that are valid keys.
A "key" has a strict syntax, so calling cfg_get_all_keys() will discard
all the values that don't have that syntax.
Ben Pfaff [Fri, 8 May 2009 17:39:17 +0000 (10:39 -0700)]
cfg: Log changes to config, not whole config, in cfg_read().
The configuration file is re-read on a regular basis by brcompatd and
vswitchd in practice. When debug-level logging is enabled on the cfg
module, it was logging the entire config file each time. Not only is this
a waste of log-file space, it's difficult for humans to see what actually
changed, if anything.
So this commit changes cfg_read() to log a diff instead of the whole config
file.
Ben Pfaff [Thu, 7 May 2009 17:35:17 +0000 (10:35 -0700)]
cfg: Improve comment.
Justin Pettit [Tue, 12 May 2009 17:44:36 +0000 (10:44 -0700)]
Only send NetFlow notifications for IP traffic.
NetFlow only supports exporting information about IP. We were sending a
notification for any flow that expired, which included non-IP packets.
This would generate NetFlow messages with nearly all fields set to zero.
Now, we only send NetFlow for packets that are IP. (Bug #1256)
Ben Pfaff [Tue, 12 May 2009 17:25:37 +0000 (10:25 -0700)]
Remove the ChangeLog since it is no longer relevant for OpenVSwitch.
It might make perfect sense to start a new file here for OpenVSwitch, but
the first item should be something like "1 June 2009: Initial public
release".
Ben Pfaff [Tue, 12 May 2009 17:21:43 +0000 (10:21 -0700)]
Remove spanning tree documentation, since STP doesn't work right now.
Justin Pettit [Mon, 11 May 2009 23:33:08 +0000 (16:33 -0700)]
Update OpenFlow tcpdump patch to work with latest code.
With some of the recent (and not so recent) changes to the source code,
the OpenFlow patch to tcpdump came out of sync. This brings it back so
it works again.
Justin Pettit [Mon, 11 May 2009 23:01:14 +0000 (16:01 -0700)]
Rename strlcpy to ovs_strlcpy.
If strlpy is not defined on the build system, we build our own and added
it to the OpenVSwitch library. Unfortunately, programs that link
against the library may do the same thing, and there will be a name
conflict. This renames our implementation to prevent these linking errors.
Ben Pfaff [Mon, 11 May 2009 17:36:32 +0000 (10:36 -0700)]
Rename the project to OpenVSwitch and change version number to 0.90.0.
The Debian packages have not been renamed yet, since they need plenty of
other work at the moment too.
Ben Pfaff [Tue, 5 May 2009 20:59:17 +0000 (13:59 -0700)]
datapath: Remove hardware table support.
This support was broken anyhow. We have no immediate plans to fix it, so
it's better not to claim to support it.
Ben Pfaff [Wed, 6 May 2009 22:40:21 +0000 (15:40 -0700)]
datapath: Compare entire flow during lookup, not just first 4 or 8 bytes.
The size of a pointer is not the size of the referent.
Only God knows how much havoc this was wreaking.
(The change in dp_table_lookup is for conformance with kernel style only.)