Ben Pfaff [Thu, 17 Feb 2011 23:04:44 +0000 (15:04 -0800)]
ofproto: Fix behavior when special_cb not present (as with ovs-openflowd).
The special_cb hook allows ofproto's client to intercept packets. When
it is not present (as in ovs-openflowd), no packets need to be intercepted,
but ofproto implemented the opposite behavior. This fixes the problem.
Reported-by: kk yap <yapkke@stanford.edu>
Ethan Jackson [Thu, 17 Feb 2011 20:52:48 +0000 (12:52 -0800)]
ovsdb-server: Fix memory leak.
Reported-by: Peter Balland <peter@nicira.com>
Bug #4698.
Ben Pfaff [Fri, 4 Feb 2011 23:10:27 +0000 (15:10 -0800)]
vconn-stream: Make definitions of tcp_vconn_class, etc., easier to find.
When object definitions are entirely hidden inside macros with token
pasting tricks, tools like "tags" and even "grep" cannot find them. This
change makes the definitions of tcp_vconn_class and other stream-based
vconns easier to find, by exposing their definitions to these tools.
Reported-by: Yongqiang Liu <liuyq7809@gmail.com>
Ben Pfaff [Tue, 15 Feb 2011 18:17:44 +0000 (10:17 -0800)]
Avoid unneeded database compaction at startup, and improve backups.
Until now, Open vSwitch "start" has always converted the database to the
current database schema. This compacts the database, which as a side
effect throws away useful information about the transactions that were
executed to bring the database into its current state. This can make
debugging database-related problems more difficult.
This commit changes the "start" command to only convert the database if
the database schema has changed. It also adds the database checksum to
the backup file name, to avoid overwriting backups in the case where the
checksum changed but the developer neglected to update the version number.
I tested an earlier version of the xenserver changes but not any version
of the Debian changes.
Ben Pfaff [Tue, 8 Feb 2011 23:57:14 +0000 (15:57 -0800)]
ovsdb-tool: New command "needs-conversion".
Ben Pfaff [Tue, 8 Feb 2011 23:23:33 +0000 (15:23 -0800)]
ovsdb-tool: Add commands for printing the database checksum.
Ben Pfaff [Tue, 8 Feb 2011 23:36:21 +0000 (15:36 -0800)]
ovsdb: New function ovsdb_file_read_schema() for reading schema from db.
This new function saves reading the whole database when only the schema is
of interest. This commit adapts ovsdb-tool to use it for the "db-version"
command. Upcoming commits will introduce another caller.
Ben Pfaff [Thu, 10 Feb 2011 17:34:42 +0000 (09:34 -0800)]
ovs-vsctl: Improve documentation and --help output.
Ethan Jackson [Tue, 15 Feb 2011 01:28:56 +0000 (17:28 -0800)]
ovs-bugtool: Ignore deprecation warnings.
Since we have to support many versions of Python, this commit
forces ovs-bugtool to ignore deprecation warnings. They were
complaining about use of the md5 module whose replacement does not
appear until Python 2.5. In Python 2.7 deprecation warnings are
ignored by default.
Bug #4373
Andrew Evans [Tue, 15 Feb 2011 18:36:38 +0000 (10:36 -0800)]
debian: Add license information for new xen-bugtool plugin to copyright.in.
Ben Pfaff [Tue, 15 Feb 2011 18:07:20 +0000 (10:07 -0800)]
dpif-netdev: Fix segfault handling packets.
Reported-by: Hassan Khan <hassan.khan@seecs.edu.pk>
Andrew Evans [Fri, 11 Feb 2011 19:29:33 +0000 (11:29 -0800)]
xenserver: Replace customized xen-bugtool with plugin to collect qdisc info.
XenServer RPMs have installed a modified /usr/sbin/xen-bugtool that is
identical to upstream except for an additional command to collect tc qdisc
class configuration for each network interface. Since xen-bugtool has an
extension mechanism, use that instead of maintaining a parallel patched
xen-bugtool.
This does change the content of the bug report slightly. Instead of one file
per network interface, qdisc class info for all interfaces is written to one
file. This is an artifact of the xen-bugtool extension mechanism: a single
extension command's output must go to one file, and it is impractical to create
individual <command> tags for each interface dynamically.
Reviewed by Ben Pfaff.
Andrew Evans [Mon, 14 Feb 2011 21:02:43 +0000 (13:02 -0800)]
xenserver: Clean up /usr/sbin/brctl dangling symlink.
Commit
54f16a10 removed Open vSwitch's /usr/sbin/brctl replacement for
XenServer, but because the RPM doesn't restore the original files on upgrade,
an upgrade leaves /usr/sbin/brctl a broken symlink to the removed
/usr/share/openvswitch/scripts/brctl.
This commit adds a one-time cleanup to restore the original XenServer-supplied
/usr/sbin/brctl. It also changes the RPM to restore all the replaced files with
their XenServer originals at post-uninstall time during an upgrade transaction,
just as uninstall has done up to now. This should prevent the same problem in
the future.
Bug #4667.
Ben Pfaff [Fri, 11 Feb 2011 21:16:28 +0000 (13:16 -0800)]
Remove /proc/net compatibility support.
This feature was included only to allow Citrix QA to run some tests that
interacted directly with the bridge. This feature hasn't been turned on
for some time, so it should not be necessary any longer.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Fri, 11 Feb 2011 21:48:23 +0000 (13:48 -0800)]
xenserver: Remove usr_share_openvswitch_scripts_refresh-xs-network-uuids.
This file is not distributed, which breaks the build with the message:
The distribution is missing the following files:
xenserver/usr_share_openvswitch_scripts_refresh-xs-network-uuids
Removing it from the repository fixes the problem.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Bob Ball [Fri, 11 Feb 2011 20:35:38 +0000 (12:35 -0800)]
xenserver: Don't create XAPI cache at install.
There are two mechanisms of installing a supplemental pack – one is
after installation (using the xe-install-supplemental-pack command) and
one is during installation by either creating a new install ISO with the
supplemental pack bundled or creating an HTTP directory which serves the
install files and the new supplemental pack contents.
The RPM should support both methods, but currently attempts to backup
data that doesn't exist yet. With this commit, the XAPI cache is not
created at install.
Signed-off-by: Bob Ball <bob.ball@citrix.com>
[removed sourcing /etc/xensource-inventory since it is no longer needed]
Signed-off-by: Justin Pettit <jpettit@nicira.com>
Justin Pettit [Fri, 11 Feb 2011 20:35:37 +0000 (12:35 -0800)]
xenserver: Rename ovs-external-ids to ovs-xapi-sync.
With commit 5692e3 (xenserver: Set fail_mode on internal bridges.), the
responsibilities of ovs-external-ids got expanded beyond just monitoring
external-ids. This commit renames the script to more accurately
describe its job.
Signed-off-by: Justin Pettit <jpettit@nicira.com>
Justin Pettit [Fri, 11 Feb 2011 20:35:35 +0000 (12:35 -0800)]
xenserver: Remove support for XenServer versions older than 5.6 FP1.
Commit
404c169247b1c3ac2ebad887f0421478a6cef924 breaks compatibility with
XenServers older than 5.6 FP1. This commit removes the last vestiges of
support for those older XenServer versions.
Signed-off-by: Justin Pettit <jpettit@nicira.com>
Justin Pettit [Fri, 11 Feb 2011 20:35:36 +0000 (12:35 -0800)]
xenserver: Remove brctl wrapper script.
The OVS "brctl" wrapper script was added to aid Citrix's QA and help
XenCenter display link status and statistics of bridges. Since the Citrix
integrated OVS ships without this wrapper script, it's clearly no longer
needed in the versions of XenServer we now support.
Signed-off-by: Justin Pettit <jpettit@nicira.com>
Andrew Evans [Fri, 11 Feb 2011 00:50:49 +0000 (16:50 -0800)]
xenserver: Merge upstream changes and drop pre-5.6.100 support.
Citrix have made modifications to the various interface configuration scripts
that OVS replaces, so at present those modifications are lost when OVS is
installed on e.g. XenServer 5.6.100. This commit applies those changes while
preserving OVS-specific modifications that have been made in the interim.
One major change introduced by these updates is the removal of support for
XenServer releases prior to 5.6.100.
This commit also updates the OVS-supplied xen-bugtool in similar fashion. We
will soon remove xen-bugtool from OVS altogether and move the added OVS
functionality to an XML extension as described in the Supplemental Pack DDK
guide.
Ethan Jackson [Fri, 11 Feb 2011 00:47:45 +0000 (16:47 -0800)]
vswitchd: Fix broken load rebalancing with balance-tcp.
Load rebalancing was not working in balance-tcp mode due to
mistaken balance-slb only assumptions leftover in the bridge code.
Ben Pfaff [Thu, 10 Feb 2011 21:20:27 +0000 (13:20 -0800)]
docs: Consistently suggest /etc/openvswitch/conf.db as location for db.
Our Debian and XenServer packages use /etc/openvswitch/conf.db as the
location for the database but some of the docs suggested
/etc/ovs-vswitchd.conf.db. This settles on the former consistently.
The manpage is still ovs-vswitchd.conf.db but I don't know what to do
about that.
Ethan Jackson [Wed, 9 Feb 2011 02:55:17 +0000 (18:55 -0800)]
xenserver: Set fail_mode on internal bridges.
The fail_mode was not getting set on internal bridges. This commit
forces ovs-external-ids to automatically set fail_mode on all new
bridges.
Signed-off-by: Ethan Jackson <ethan@nicira.com>
Bug #4494.
Ben Pfaff [Wed, 9 Feb 2011 00:43:40 +0000 (16:43 -0800)]
xenserver: Introduce "force-reload-kmod" to reload kernel module.
Running "service openvswitch force-reload-kmod" will now save the kernel
configuration state of Open vSwitch interfaces, stop the vswitch, unload
the kernel module, reload the kernel module, restart the vswitch, and
restore kernel configuration state. It is a reasonably safe way to upgrade
or downgrade the Open vSwitch kernel module on a running system.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Wed, 9 Feb 2011 00:10:34 +0000 (16:10 -0800)]
ovs-vsctl: Add formatting options for the "list" and "find" commands.
The default format is the same as before (which the testsuite verifies).
The most important use for the new formatting options is --bare, which
outputs a format that is easy to parse from a shell script. An upcoming
patch will start using that.
Ben Pfaff [Wed, 2 Feb 2011 19:24:35 +0000 (11:24 -0800)]
table: Add new "bare" output formatting options.
--format=list corresponds to the output format that "ovs-vsctl list" has
always used.
--bare is easier for scripts to parse.
Ben Pfaff [Wed, 9 Feb 2011 00:09:45 +0000 (16:09 -0800)]
ovsdb-client: Break table formatting into new library.
This makes the table formatting functions available to other programs.
ovs-vsctl will start using it soon on the "list" and "find" commands.
Ben Pfaff [Tue, 8 Feb 2011 18:21:59 +0000 (10:21 -0800)]
ovs-vsctl: Add new "find" command.
This allows listing records that match specified criteria, instead
of just records that have specific names.
This will be used in an upcoming patch, along with --columns, to
list all of the interfaces whose type is 'internal'.
Ben Pfaff [Tue, 8 Feb 2011 18:27:35 +0000 (10:27 -0800)]
ovs-vsctl: Add --columns options to "list" command.
This allows the user to list just selected columns from a table,
for example just the "name" column.
This will become more useful as additional formatting options
are added in upcoming commits.
Ben Pfaff [Tue, 8 Feb 2011 18:21:10 +0000 (10:21 -0800)]
ovs-vsctl: Fix spelling of "satisfied" in function name.
Suggested-by: Ethan Jackson <ethan@nicira.com>
Ethan Jackson [Tue, 8 Feb 2011 19:50:15 +0000 (11:50 -0800)]
ovsdb: Fix unused warning.
"warning: 'parse_db_string_column' defined but not used"
This commit fixes the above warning when compiling on systems which
do not have SSL support. It also causes query_db_string() to
always be compiled on these systems as it is not SSL specific and
may be useful in the future.
Andrew Evans [Mon, 7 Feb 2011 22:41:09 +0000 (14:41 -0800)]
xenserver: Make openvswitch-cfg-update reset 'manager_options' column.
Andrew Evans [Mon, 7 Feb 2011 20:40:01 +0000 (12:40 -0800)]
xenserver: Display managers referenced by 'manager_options' in xsconsole.
Andrew Evans [Fri, 4 Feb 2011 21:30:02 +0000 (13:30 -0800)]
ovs-vsctl: Add commands to get/delete/set manager connections.
Jesse Gross [Tue, 8 Feb 2011 01:22:58 +0000 (17:22 -0800)]
datapath: Check for backported rcu_read_lock_held.
New versions of Xen backport this function.
Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Jesse Gross [Mon, 7 Feb 2011 23:57:09 +0000 (15:57 -0800)]
datapath: Use vlan deacceleration function in upcall.
vlan_deaccel_tag() was introduced to move a vlan tag from skb->vlan_tci
to the packet but there was still an open coded variant when doing
an upcall. vlan_deaccel_tag() also clears skb->vlan_tci which is not
currently done but it makes no difference.
Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Jesse Gross [Mon, 7 Feb 2011 23:50:04 +0000 (15:50 -0800)]
datapath: Don't use vlan_features before 2.6.26.
Support for offloading over vlans wasn't introduced until 2.6.26,
so do full software emulation on kernels before that when dealing
with vlan packets.
Reported-by: Justin Pettit <jpettit@nicira.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Justin Pettit [Mon, 7 Feb 2011 06:46:27 +0000 (22:46 -0800)]
datapath: Better calculate max nlattr-formatted flow size.
Both userspace and the kernel allocate space based on the max size of a
nlattr-formatted flow. It was easy to change the max size of a flow
definition and cause crashes by forgetting to update one or both of
those definitions. This commit attempts to make that harder by
providing a better description of how the max size is calculated and a
build check to look for a common indication that it may have changed.
Signed-off-by: Justin Pettit <jpettit@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
Justin Pettit [Mon, 7 Feb 2011 06:39:09 +0000 (22:39 -0800)]
datapath: Increase size of max nlattr-formatted flow to 132.
The addition of IPv6 matching increased the maximum size of a
nlattr-formatted flow. This was not properly reflected in the userspace
and kernel #defines that reserve space for the flows and could lead to
crashes. This commit increases the size uniformly to 132 bytes.
Signed-off-by: Justin Pettit <jpettit@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
Simon Horman [Mon, 7 Feb 2011 02:07:14 +0000 (11:07 +0900)]
datapath: Clear rxhash when using an action that may affect it
Signed-off-by: Simon Horman <horms@verge.net.au>
[Jesse: Change version check from 2.6.37 to 2.6.35]
Signed-off-by: Jesse Gross <jesse@nicira.com>
Ethan Jackson [Mon, 7 Feb 2011 22:53:39 +0000 (14:53 -0800)]
vswitchd: Incoming LACP packets should un-default links.
Ethan Jackson [Mon, 7 Feb 2011 22:34:44 +0000 (14:34 -0800)]
vswitchd: LACP attached status flapped.
A bug introduced in the switch to bit mask LACP status caused the
attached status of interfaces in a LACP bond to slowly flap.
Ethan Jackson [Fri, 4 Feb 2011 02:33:53 +0000 (18:33 -0800)]
vswitchd: Process special packets more aggressively.
Before this patch, special packets such as LACP and CFM messages
were only processed if they had NORMAL open flow actions. With
this patch these messages are always processed unless originated in
ofproto_send_packet().
Jesse Gross [Thu, 30 Dec 2010 20:28:10 +0000 (12:28 -0800)]
datapath: Add module parameter to allow TSO with vlans.
We currently perform GSO on packets before adding a vlan tag,
which is reliable but hurts performance. Even NICs that support
TSO on vlan tagged packets typically expect vlan acceleration to
be used. Before 2.6.37 we can't use vlan acceleration and must
place the tag in the packet itself, which is risky when used with
TSO. However, if the driver is known to work with internally
tagged packets and TSO this exposes a module parameter to enable it.
Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Jesse Gross [Thu, 30 Dec 2010 21:13:04 +0000 (13:13 -0800)]
datapath: Add definition for FCoE offload.
FCoE offload was introduced in 2.6.30, so this introduces a null
definition for it on earlier kernels.
Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Jesse Gross [Thu, 30 Dec 2010 06:13:15 +0000 (22:13 -0800)]
datapath: Use vlan acceleration for vlan operations.
Using the kernel vlan acceleration has a number of benefits:
it enables hardware tagging, allows usage of TSO and checksum
offloading, and is generally easier to manipulate. This switches
the vlan actions to use skb->vlan_tci field for any necessary
changes. In places that do not support vlan acceleration in a way
that we can use (in particular kernels before 2.6.37) we perform
any necessary conversions, such as tagging and GSO before the
packet leaves Open vSwitch.
Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Jesse Gross [Fri, 31 Dec 2010 04:48:38 +0000 (20:48 -0800)]
datapath: Add vlan acceleration field for older kernels.
Kernels prior to 2.6.27 did not have a vlan_tci field in struct
sk_buff for vlan acceleration. It's very convenient to use this
field for manipulating vlan tags, so we would like to use it as
the primary mechanism. To enable this, this commit adds similar
infrastructure to the OVS_CB on the kernels that need it and a
set of functions to use the correct location.
Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Jesse Gross [Mon, 7 Feb 2011 21:05:34 +0000 (13:05 -0800)]
tunneling: Check refcount of each page in frags.
We check the refcount of each page in a fragmented skb
to see if we need to do a linearize before computing the
checksum. However, although we iterate over the list of
pages, we always check the first one.
Reported-by: Ben Pfaff <blp@nicira.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Justin Pettit [Mon, 7 Feb 2011 19:44:54 +0000 (11:44 -0800)]
debian: Store more system information in OVSDB.
Store the OVS version in OVSDB. Additionally, if the "lsb_release"
command is available, store information about the system type and
version.
Bug #4576
Justin Pettit [Mon, 7 Feb 2011 18:43:15 +0000 (10:43 -0800)]
xenserver: Consistently use spaces instead of tabs in init script.
Ben Pfaff [Fri, 28 Jan 2011 20:44:00 +0000 (12:44 -0800)]
ovs-vswitchd: Complete daemonization only after initial configuration.
Otherwise when we add support for saving and restoring configuration
of internal devices around kernel module unload and reload, there's
no easy way for the "restore" code to tell when all the interfaces
should be set up and ready for configuration.
Ben Pfaff [Fri, 28 Jan 2011 20:39:15 +0000 (12:39 -0800)]
daemon: Define daemon options enums the same way as other option enums.
Other modules that accept options use this style and I don't see a reason
for the daemon code to be different. The style used by the daemon code
until now runs the risk of ending up with conflicting values accidentally,
which would be confusing.
Ben Pfaff [Mon, 7 Feb 2011 20:46:25 +0000 (12:46 -0800)]
ofproto: Clear out entire 'name' field of ofp_phy_port when initializing.
Sometimes garbage could appear in the name field following the port name,
since it wasn't completely zeroed.
Reported-by: kk yap <yapkke@openvswitch.org>
Tested-by: kk yap <yapkke@openvswitch.org>
Ethan Jackson [Fri, 4 Feb 2011 00:19:52 +0000 (16:19 -0800)]
vswitchd: LACP switch lacp_status to bit mask.
Much of the LACP status information attached to an interface is
moved from an enum to a bit mask in this commit. The main reason
to do this is to allow a link to be concurrently expired and
defaulted. With this commit, if a link enters an expired state,
but has never had its partner information update, it will properly
set the defaulted flag in its LACP messages.
Ethan Jackson [Sat, 5 Feb 2011 02:26:22 +0000 (18:26 -0800)]
vswitchd: Instrument lacp_update_ifaces().
Ethan Jackson [Sat, 5 Feb 2011 02:23:47 +0000 (18:23 -0800)]
vswitchd: Fix format of LACP appctl output.
Ethan Jackson [Sat, 5 Feb 2011 02:16:39 +0000 (18:16 -0800)]
vswitchd: Tweak LACP values.
Hardware sets the default LACP partner information to 0 so this
commit follows. The collector delay is a more interesting
case. Hardware sets it to 32768 and Linux sets it to 0. The
collector delay relates to a part of the LACP protocol which we
don't implement so we follow Linux in this case.
Ethan Jackson [Sat, 5 Feb 2011 02:13:55 +0000 (18:13 -0800)]
vswitchd: Reset LACP partner when set off.
Without this patch, the LACP partner information will not be
cleared if LACP is turned off after a successful negotiation.
Justin Pettit [Sun, 6 Feb 2011 09:02:23 +0000 (01:02 -0800)]
debian: Backup OVSDB db file before converting it.
The XenServer init script makes a backup before converting the OVSDB
database file. This may be useful for debugging, so do the same on
Debian. Also, store the schema version in the database.
Ben Pfaff [Tue, 18 Jan 2011 19:51:46 +0000 (11:51 -0800)]
netlink: Use proper types and functions for half-aligned 64-bit values.
These haven't showed up as problems yet in my tests but it is only a matter
of time.
Ben Pfaff [Tue, 18 Jan 2011 19:50:56 +0000 (11:50 -0800)]
openflow: Use types and accessors for half-aligned 64-bit fields.
Without this commit, many of the unit tests for ofp-print.c fail with bus
errors on RISC architectures (tested on sparc) and presumably so would any
other code that uses these same struct members.
Ben Pfaff [Sat, 5 Feb 2011 21:14:47 +0000 (13:14 -0800)]
Add types and accessors for working with half-aligned 64-bit values.
Both OpenFlow and Netlink contain 64-bit fields that are only guaranteed
to be aligned on 32-bit boundaries. This commit introduces types for
representing these fields and functions for working with them. Followup
commits will make the OpenFlow and Netlink code use these types and
functions.
Jesse Gross [Fri, 4 Feb 2011 21:25:04 +0000 (13:25 -0800)]
tunneling: Always use skb->len for PMTUD.
Currently IPv4 uses the length of the packet in the IP header
and IPv6 uses actual length of the packet for path MTU discovery.
This changes both to use the length of the packet to be consistent
with each other and the the Linux IP stack and also to match what
actually causes fragmentation.
Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Jesse Gross [Fri, 4 Feb 2011 21:15:18 +0000 (13:15 -0800)]
tunneling: Fix uninitialized variable warning in check_mtu.
The MTU is only needed if we are doing PMTUD but some compilers
complain that it could be used uninitialized.
Reported-by: Justin Pettit <jpettit@nicira.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Jesse Gross [Fri, 4 Feb 2011 21:54:58 +0000 (13:54 -0800)]
vlan-test: Add examples of vlan problems to man page.
Ben Pfaff [Fri, 4 Feb 2011 20:35:49 +0000 (12:35 -0800)]
datapath: Tolerate backporting of rtnl_link_stats64 (as in RHEL 6).
Red Hat Enterprise Linux 6 has a 2.6.32 kernel but it backports the
rtnl_link_stats64 structure that was introduced in 2.6.35, so we need to
check whether it was defined instead of just guessing based on the kernel
version number.
Build-tested only, on 2.6.32-71.14.1.el6 (RHEL 6),
linux-2.6.18-128.1.6.el5.xs5.5.0.496.101 (XenServer 5.5.0),
2.6.18-128.1.6.el5.xs5.5.0.505.1024xen (XenServer 5.5.0 update 1),
and upstream 2.6.18, 2.6.26, 2.6.29, 2.6.33, 2.6.34, 2.6.36, all for i386,
plus 2.6.36 for x86-64.
My machine's userspace headers have <linux/if_link.h> but not
rtnl_link_stats64. Jesse Gross tested the case where <linux/if_link.h>
has rtnl_link_stats64, on Ubuntu 10.10.
Reported-by: Geoff White <gwhite@nicira.com>
Tested-by: Jesse Gross <jesse@nicira.com>
Jesse Gross [Mon, 31 Jan 2011 23:25:12 +0000 (15:25 -0800)]
datapath-protocol: Drop useless/obsolete comments.
Some of the comments related to compat code that no longer exists,
types which are defined elsewhere, or are generally not very helpful.
Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Jesse Gross [Mon, 31 Jan 2011 23:15:05 +0000 (15:15 -0800)]
datapath-protocol: Dropped unused __aligned_* types.
These types are no longer used, are redundantly defined, and were
cluttering our interface header.
Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Fri, 4 Feb 2011 19:01:43 +0000 (11:01 -0800)]
vswitchd: Deconfigure CFM when not configured.
It looks to me like, once a CFM object is configured on an interface, it
will never get deconfigured. This fixes the problem.
Found by inspection. I haven't tested the original code or the fix.
Ben Pfaff [Tue, 1 Feb 2011 19:32:06 +0000 (11:32 -0800)]
datapath: Consider tunnels to have no MTU, fixing jumbo frame support.
Until now, tunnel vports have had a specific MTU, in the same way that
ordinary network devices have an MTU, but treating them this way does not
always make sense. For example, consider a datapath that has three ports:
the local port, a GRE tunnel to another host, and a physical port. If
the physical port is configured with a jumbo MTU, it should be possible to
send jumbo packets across the tunnel: the tunnel can do fragmentation or
the physical port traversed by the tunnel might have a jumbo MTU.
However, until now, tunnels always had a 1500-byte MTU by default. It
could be adjusted using ODP_VPORT_MTU_SET, but nothing actually did this.
One alternative would be to make ovs-vswitchd able to set the vport's MTU.
This commit, however, takes a different approach, of dropping the concept
of MTU entirely for tunnel vports. This also solves the problem described
above, without making any additional work for anyone.
I tested that, without this change, I could not send 1600-byte "pings"
between two machines whose NICs had 2000-byte MTUs that were connected to
vswitches that were in turn connected over GRE tunnels with the default
1500-byte MTU. With this change, it worked OK, regardless of the MTU of
the network traversed by the GRE tunnel.
This patch also makes "patch" ports MTU-less.
It might make sense to remove vport_set_mtu() and the associated callback
now, since ordinary network devices are the only vports that support it
now.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Suggested-by: Jesse Gross <jesse@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
Bug #3728.
Jesse Gross [Fri, 28 Jan 2011 02:16:07 +0000 (18:16 -0800)]
tunneling: Simplify path MTU discovery logic.
Previously, if path MTU discovery was disabled we would use the
tunnel MTU instead of the underlying route's path MTU but otherwise
still do PMTUD. This doesn't make much sense because turning off
PMTUD really means to not check the size of the encapsulated packets
at all. This removes the disconnect and simplifies the logic.
Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff [Tue, 1 Feb 2011 19:24:51 +0000 (11:24 -0800)]
daemon: Suppress valgrind warnings from read_pidfile().
The version of valgrind I have in my test VMs doesn't know what F_GETLK
does, so it complains that l_pid is uninitialized even though fcntl sets
it. Initializing it ourselves before calling the function avoids a series
of false-positive warnings about use of uninitialized data.
Ben Pfaff [Tue, 1 Feb 2011 19:23:30 +0000 (11:23 -0800)]
Zero padding bytes in odp_key_ipv4, odp_key_arp.
This is a potential security issue for the kernel. In userspace it just
provokes false-positive valgrind warnings (which is how I found it).
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
Andrew Evans [Wed, 2 Feb 2011 08:08:12 +0000 (00:08 -0800)]
ovs-vsctl: Clear manager_options column and delete Manager rows on emer-reset.
Ethan Jackson [Sat, 29 Jan 2011 00:53:06 +0000 (16:53 -0800)]
xenserver: Allow LACP configuration from xapi.
Makes required changes to interface reconfigure to allow LACP
configuration from xapi. Conforms to XenServer style bonding
configuration which is slightly different from OVS.
Signed-off-by: Ethan Jackson <ethan@nicira.com>
Bug #4213.
Ethan Jackson [Fri, 28 Jan 2011 04:25:03 +0000 (20:25 -0800)]
vswitchd: Implement balance-tcp bonding.
This commit implements a new bonding mode "balance-tcp" which takes
into account L4 flow information when hashing. If LACP negotiation
is unsuccessful it automatically falls back to "balance-slb" bonding.
Bug #4213.
Ethan Jackson [Wed, 19 Jan 2011 02:46:58 +0000 (18:46 -0800)]
vswitchd: Implement Link Aggregation Control Protocol.
This commit implements LACP, a protocol which allows directly
connected switches to automatically negotiate which links may
participate in bonds. This commit disables LACP by default. Once
sufficiently tested, LACP will be enabled in "active" mode on
bonded ports, and "passive" mode on all others.
Bug #4213.
Ethan Jackson [Fri, 28 Jan 2011 01:26:45 +0000 (17:26 -0800)]
vswitchd: Cache interface carrier when bonding.
This commit caches each interface's carrier status when bonding is
enabled. This allows port_update_bond_compat() to be called less
often, and will prove useful in future patches.
Ethan Jackson [Wed, 26 Jan 2011 21:14:42 +0000 (13:14 -0800)]
bridge: Cache bridge Ethernet address in struct bridge.
This patch stores each bridge's Ethernet address in its handle so
that it may be used in future patches.
Ethan Jackson [Wed, 26 Jan 2011 00:20:08 +0000 (16:20 -0800)]
packets: Add eth_addr_compare_3way function.
This commit adds eth_addr_compare_3way() which behaves like memcmp
for Ethernet addresses.
Ethan Jackson [Wed, 19 Jan 2011 19:08:03 +0000 (11:08 -0800)]
lib: Correct endianness of packets.h.
Andrew Evans [Thu, 3 Feb 2011 00:47:27 +0000 (16:47 -0800)]
xenserver: Make ovsdb-server look for remotes in manager_options column.
(ovsdb-server will still use any managers found in the managers column as
well.)
Justin Pettit [Wed, 2 Feb 2011 06:54:11 +0000 (22:54 -0800)]
nicira-ext: Support matching IPv6 Neighbor Discovery messages.
IPv6 uses Neighbor Discovery messages in a similar manner to how IPv4
uses ARP. This commit adds support for matching deeper into the
payloads of Neighbor Solicitation (NS) and Neighbor Advertisement (NA)
messages. Currently, the matching fields include:
- NS and NA Target (nd_target)
- NS Source Link Layer Address (nd_sll)
- NA Target Link Layer Address (nd_tll)
When defining IPv6 Neighbor Discovery rules, the Nicira Extensible Match
(NXM) extension to OVS must be used.
Signed-off-by: Justin Pettit <jpettit@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Justin Pettit [Thu, 30 Dec 2010 03:03:46 +0000 (19:03 -0800)]
nicira-ext: Support matching IPv6 traffic.
Provides ability to match over IPv6 traffic in the same manner as IPv4.
Currently, the matching fields include:
- IPv6 source and destination addresses (ipv6_src and ipv6_dst)
- Traffic Class (nw_tos)
- Next Header (nw_proto)
- ICMPv6 Type and Code (icmp_type and icmp_code)
- TCP and UDP Ports over IPv6 (tp_src and tp_dst)
When defining IPv6 rules, the Nicira Extensible Match (NXM) extension to
OVS must be used.
Signed-off-by: Justin Pettit <jpettit@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Justin Pettit [Tue, 7 Dec 2010 22:02:17 +0000 (14:02 -0800)]
nicira-ext: Support matching ARP source and target hardware addresses.
OpenFlow 1.0 doesn't allow matching on the ARP source and target
hardware address. This has caused us to introduce hacks such as the
Drop Spoofed ARP action. Now that we have extensible match, we can
match on more fields within ARP:
- Source Hardware Address (arp_sha)
- Target Hardware Address (arp_tha)
Signed-off-by: Justin Pettit <jpettit@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Justin Pettit [Wed, 2 Feb 2011 19:33:20 +0000 (11:33 -0800)]
lib: Replace IP_TYPE_ references with IPPROTO_.
A few common IP protocol types were defined in "lib/packets.h". However,
we already assume the existence of <netinet/in.h> which contains a more
exhaustive list and should be available on POSIX systems.
Ethan Jackson [Wed, 2 Feb 2011 02:50:25 +0000 (18:50 -0800)]
lib: Move l4 flow hash to the flow library.
This commit moves hash_symmetric_l4() to the flow library so that
it may be used in future patches.
Ethan Jackson [Wed, 2 Feb 2011 02:19:39 +0000 (18:19 -0800)]
ovs-vlan-test: clearly indicate failure.
Andrew Evans [Wed, 2 Feb 2011 08:05:54 +0000 (00:05 -0800)]
Debian: Make ovsdb-server use manager_options column to find managers.
Andrew Evans [Fri, 28 Jan 2011 23:39:55 +0000 (15:39 -0800)]
ovsdb-server: Write manager status information to Manager table.
This commit makes the status of manager connections visible via the Manager
table in the database. Two new columns have been created for this purpose:
'is_connected' and 'status'. The former is a boolean flag, and the latter is a
string-string map which may contain the keys "last_error", "state", and
"time_in_state".
Requested-by: Keith Amidon <keith@nicira.com>
Reviewed by: Ben Pfaff.
Feature #3692.
Justin Pettit [Sat, 15 Jan 2011 19:12:12 +0000 (11:12 -0800)]
tests: Add test suite for packets.h.
This only tests ip_is_cidr(), since that is the only tricky function
currently defined. This will get more use once IPv6 functions are
added.
Justin Pettit [Fri, 7 Jan 2011 07:39:42 +0000 (23:39 -0800)]
ovs-ofctl: Group NXM field matches into own subsection of man page.
A number of new matching fields are going to be introduced shortly that
will require NXM (Nicira Extended Match). Rather than repeating the
same description for each field, this change groups them together with a
common preface.
Justin Pettit [Fri, 21 Jan 2011 09:34:09 +0000 (01:34 -0800)]
ovs-ofctl: Fix small typo about nw_tos in man page.
Ethan Jackson [Tue, 1 Feb 2011 06:45:58 +0000 (22:45 -0800)]
lib: Fix off-by-one error in route-table.
Ben Pfaff [Tue, 1 Feb 2011 17:25:26 +0000 (09:25 -0800)]
datapath: Dump flow actions only if there is room.
Expanding an skbuff in a netlink dump handler doesn't work well. We
weren't updating the truesize of the skb or the allocation within the
socket that netlink_dump() had put the skb in. The code had other bugs
too.
This commit fixes the problem (in my tests, anyway) by avoiding expanding
the reply skbuff to fill in the actions. Instead, in such a case the
userspace client has to do a separate "get" action to get the actions.
This commit also updates userspace to do this automatically for dumps in
the cases where the caller cares (only "ovs-dpctl dump-flows" currently
cares).
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
Bug #4520.
Ben Pfaff [Mon, 31 Jan 2011 23:47:43 +0000 (15:47 -0800)]
datapath: Fix behavior of NLA_NESTED for pre-2.6.29 kernels.
Before v2.6.29, a NLA_NESTED attribute, if it was present, was not allowed
to be empty. However, OVS depends on the ability to accept empty
attributes. For example, a present but empty ODP_FLOW_ATTR_ACTIONS on
ODP_FLOW_CMD_SET replaces the existing set of actions by an empty "drop"
action, whereas a missing ODP_FLOW_ATTR_ACTIONS leaves the existing
actions, if any, unchanged.
NLA_NESTED is different from NLA_UNSPEC in only two ways:
* If the size of the nested attributes is zero, no further size checks
are performed.
* If the size of the nested attributes is not zero and no length
parameter is specified the minimum size of nested attributes is
NLA_HDRLEN.
nla_parse_nested() validates that there is at least enough space for
NLA_HDRLEN, so neither of these conditions are important, and we might
as well use NLA_UNSPEC with old kernels.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
Ben Pfaff [Mon, 31 Jan 2011 23:46:03 +0000 (15:46 -0800)]
dpif-linux: Always pass an actions attribute in dpif_flow_put().
The kernel expects that ODP_FLOW_NEW always has an ODP_FLOW_ATTR_ACTIONS
attribute, even though that attribute may be empty to drop all of the
packets in the flow. Similarly, ODP_FLOW_SET as used by
dpif_linux_flow_put() should always have such an attribute, since it is
used by OVS to update the flow's actions. So make it possible for
dpif_linux_flow_to_ofpbuf() to pass an empty actions attribute, and make
dpif_linux_flow_put() always force that behavior if the actions_len passed
to it is 0.
This fixes EINVAL error creating flows to drop packets.
Acked-by: Jesse Gross <jesse@nicira.com>
Ethan Jackson [Mon, 31 Jan 2011 01:52:19 +0000 (17:52 -0800)]
lib: route-table improvements.
This commit makes several changes to the route_table code used to
populate tunnel_egress_iface.
- It removes name_table code from netdev-vport and puts it into
route-table.
- It no longer attempts to build the name_table dynamically by
listening to rtnetlink-link notifications. Instead it dumps the
entire table, and uses rtnetlink-link notifications to indicate a
re-dump is required.
- It forces rtnetlink-link notifications to re-dump the routing
table. This fixes an issue where bringing an interface down or
removing it altogether would not have the expected effect on
related tunnel_egress_ifaces.
Ethan Jackson [Mon, 31 Jan 2011 20:02:54 +0000 (12:02 -0800)]
lib: netdev-vport improperly initialized route-table.
netdev-vport unregistered the routing table in its destroy
function, but registered it in its init function. This could
cause the routing table to be unregistered when it shouldn't have
been causing segmentation faults.
Bug #4526.
Ethan Jackson [Mon, 31 Jan 2011 04:02:16 +0000 (20:02 -0800)]
tests: Fix tests with UCS-2 Python.
Python can be built with either UCS2 or UCS4 support. When built
with UCS2 the python related surrogate pairs tests cannot pass.
This commit handles this situation more gracefully.