Sajjad Lateef [Tue, 17 May 2011 02:16:51 +0000 (19:16 -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>
Sajjad Lateef [Tue, 17 May 2011 00:29:04 +0000 (17:29 -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)
Ben Pfaff [Mon, 16 May 2011 20:22:05 +0000 (13:22 -0700)]
netdev-linux: Initialize rx_compressed, tx_compressed when converting.
rtnl_link_stats64 has rx_compressed and tx_compressed members that
struct netdev_stats lacks, so we need to initialize them to zero when
converting.
Found by valgrind.
Ben Pfaff [Mon, 16 May 2011 20:03:49 +0000 (13:03 -0700)]
bridge: Avoid double-free of bond fake ifaces.
Found by valgrind.
Ben Pfaff [Fri, 13 May 2011 23:50:20 +0000 (16:50 -0700)]
ofproto-dpif: Fix null pointer dereference in get_ofp_port().
Ben Pfaff [Fri, 13 May 2011 23:47:01 +0000 (16:47 -0700)]
bridge: Fix uninitialized bond_stable_ids in port_configure_bond().
The recent merge of "master" added a new bond_stable_ids member to
struct ofproto_bundle_settings, but neglected to initialize it. This fixes
the problem.
Found and verified using valgrind.
Ben Pfaff [Fri, 13 May 2011 16:14:18 +0000 (09:14 -0700)]
ofproto: Call port_modified before closing old netdev in update_port().
Fixes a segmentation fault due to update_port() -> port_modified() ->
bond_slave_set_netdev() -> netdev_monitor_remove() -> netdev_get_name().
Reported-by: Michael MAO <mmao@nicira.com>
Ben Pfaff [Fri, 13 May 2011 00:24:34 +0000 (17:24 -0700)]
Fix bugs lingering from merge mistakes.
I should have caught these when I did the merge from "master" earlier
today, but I forgot to run the testsuite.
Ben Pfaff [Thu, 12 May 2011 19:21:23 +0000 (12:21 -0700)]
ofproto: Fix duplicate hmap_remove() in ofproto_destroy().
Both ofport_destroy() and its caller ofproto_destroy() were attempting to
remove the ofport's hmap_node from the ofproto's 'ports' hmap, resulting
in a use-after-free error.
Reported-by: Michael MAO <mmao@nicira.com>
Ben Pfaff [Thu, 12 May 2011 19:08:48 +0000 (12:08 -0700)]
ofproto: Fix typo in comment.
Reported-by: Ethan Jackson <ethan@nicira.com>
Ben Pfaff [Thu, 12 May 2011 19:05:42 +0000 (12:05 -0700)]
Merge 'master' into 'next'.
Ben Pfaff [Wed, 11 May 2011 18:03:25 +0000 (11:03 -0700)]
ofproto-dpif: Get rid of effectively unused 'check_special' flag.
Nothing ever sets this flag to false any longer, so there's no need to
store it or test its value.
Reported-by: Ethan Jackson <ethan@nicira.com>
Ben Pfaff [Thu, 12 May 2011 16:58:01 +0000 (09:58 -0700)]
Implement basic multiple table support.
This implements basic multiple table support in ofproto and supporting
libraries and utilities. The design is the same as the one that has been
on the Open vSwitch "wdp" branch for a long time. There is no support for
multiple tables in the software switch implementation (ofproto-dpif), only
a set of hooks for other switch implementations to use.
To allow controllers to add flows in a particular table, Open vSwitch adds
an OpenFlow 1.0 extension called NXT_FLOW_MOD_TABLE_ID.
Ben Pfaff [Tue, 26 Apr 2011 21:25:00 +0000 (14:25 -0700)]
ofproto: Drop ofproto_rule_lookup().
There's no reason not to implement this trivial function in ofproto-dpif,
especially since it makes less sense once multiple table support is
implemented (which table should be searched?).
Ben Pfaff [Wed, 27 Apr 2011 19:20:01 +0000 (12:20 -0700)]
PORTING: Describe usage of ovs_be<N>.
Ben Pfaff [Wed, 27 Apr 2011 18:29:50 +0000 (11:29 -0700)]
ofproto: Fix number of reported tables in OFPT_FEATURES_REPLY message.
This has been wrong for a long time.
Ben Pfaff [Wed, 11 May 2011 21:06:48 +0000 (14:06 -0700)]
ofproto: Make rule construction and destruction more symmetric.
Before, ->rule_construct() both created the rule and inserted into the
flow table, but ->rule_destruct() only destroyed the rule. This makes
->rule_destruct() also remove the rule from the flow table.
Ben Pfaff [Tue, 26 Apr 2011 20:09:24 +0000 (13:09 -0700)]
classifier: Remove OF1.0 special case from classifier_find_rule_exactly().
This special case should never have actually triggered in practice, because
OpenFlow 1.0 cannot set up an exact-match rule as defined by
flow_wildcards_is_exact(). (OpenFlow 1.0 will always, for example,
wildcard all NXM registers.)
OVS implements this OF1.0 special case differently, by changing flow
priority to 65535 in cls_rule_from_match() if the flow is an exact match as
defined by OpenFlow 1.0.
Ben Pfaff [Tue, 26 Apr 2011 19:47:39 +0000 (12:47 -0700)]
ofproto: Remove unused coverage counters.
These were mostly moved into ofproto-dpif.c, but the definitions weren't
deleted along with them.
Ben Pfaff [Wed, 11 May 2011 19:15:46 +0000 (12:15 -0700)]
ofproto: Update some comments.
Ben Pfaff [Tue, 26 Apr 2011 19:31:12 +0000 (12:31 -0700)]
ofproto: Eliminate reference to dpif_upcall from ofproto.
The dpif_upcall structure is specific to the ofproto-dpif implementation.
The generic ofproto and connmgr interface have no business using it, so
this commit switches to using ofputil_packet_in instead.
Ben Pfaff [Tue, 26 Apr 2011 18:39:10 +0000 (11:39 -0700)]
Remove unneeded #include directives.
Ben Pfaff [Tue, 26 Apr 2011 18:30:46 +0000 (11:30 -0700)]
ofproto: Better document the ofproto_class interface.
Also, make a few minor adjustments to the interface so that it makes a
little more sense.
Ben Pfaff [Wed, 11 May 2011 19:13:10 +0000 (12:13 -0700)]
ofproto: Break apart into generic and hardware-specific parts.
In addition to the changes to ofproto, this commit changes all of the
instances of "struct flow" in the tree so that the "in_port" member is an
OpenFlow port number. Previously, this member was an OpenFlow port number
in some cases and an ODP port number in other cases.
Ben Pfaff [Mon, 9 May 2011 16:33:02 +0000 (09:33 -0700)]
ofproto: Complete abstraction by adding enumeration and deletion functions.
This eliminates the final reference from bridge.c directly into the dpif
layer, which will make it easier to change the implementation of ofproto
to support other lower layers.
Ben Pfaff [Mon, 9 May 2011 16:24:39 +0000 (09:24 -0700)]
ofproto: Improve abstraction by using OpenFlow port numbers in interface.
Until now, ofproto has used a mix of datapath and OpenFlow port numbers in
its client interface. This commit changes it to use OpenFlow port numbers
exclusively, to raise the level of abstraction.
Most of this commit boils down to simple search-and-replace with a few
call to ofp_port_to_odp_port() sprinkled in. The addition of ofproto_port
is one exception. An ofproto_port is almost the same as a dpif_port; the
difference is just that its port number is an OpenFlow port number instead
of a datapath port number.
Ben Pfaff [Mon, 11 Apr 2011 22:08:19 +0000 (15:08 -0700)]
ofproto: Improve abstraction by adding function ofproto_parse_name().
This means that ovs-ofctl and ovs-openflowd don't have to use the dpif
layer at all, making it easier to change the ofproto implementation.
Ben Pfaff [Mon, 11 Apr 2011 22:07:07 +0000 (15:07 -0700)]
dpif: Make dp_parse_name() normalize its returned type.
This means that callers don't have to be concerned with a NULL return value
or unnormalized type.
Ben Pfaff [Fri, 6 May 2011 22:04:29 +0000 (15:04 -0700)]
dpif: Improve abstraction by making 'run' and 'wait' functions per-dpif.
Until now, the dp_run() and dp_wait() functions had to be called at the top
level of the program because they applied to every open dpif. By replacing
them by functions that take a specific dpif as an argument, we can call
them only from ofproto, which is currently the correct layer to deal with
dpifs.
Ben Pfaff [Wed, 11 May 2011 19:26:06 +0000 (12:26 -0700)]
bridge: Move packet processing functionality into ofproto.
Until now, packet processing in ovs-vswitchd has been split between two
components: ofproto, for basic OpenFlow functionality, and bridge, for
OFPP_NORMAL processing. This architecture will not work as Open vSwitch
starts to support a wider variety of underlying hardware, because it
imposes a model in which the bridge needs to be able to look at every
exact-match flow within a OpenFlow flow, which most hardware doesn't
support.
Therefore, this commit moves all of the packet processing code in
bridge into ofproto, as preparation for generalizing further.
Jesse Gross [Tue, 10 May 2011 18:48:36 +0000 (11:48 -0700)]
datapath: Pull data into linear area only on demand.
We currently always pull 64 bytes of data (if it exists) into the
skb linear data area when parsing flows. The theory behind this
is that the data should always be there and it's enough to parse
common flows. However, this causes a number of problems in
different situations. The first is that it is not enough to handle
IPv6 so we must pull additional data anyways. However, the main
problem is that GRO typically allocates a new skb and puts just the
headers in there. For a typical TCP/IPv4 packet there are 54 bytes
of headers, which means that we must possibly reallocate and copy
on every packet. In addition, GRO creates frag_lists with this
specific geometry in order to allow later segmentation if the packet
is forwarded to a device that does not support frag_lists. When
we pull additional data it changes the geometry and causes later
problems for the device. This patch instead incrementally pulls
data, which avoids these problems.
Signed-off-by: Jesse Gross <jesse@nicira.com>
CC: Ian Campbell <Ian.Campbell@citrix.com>
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>
Ben Pfaff [Tue, 10 May 2011 16:17:37 +0000 (09:17 -0700)]
stream-ssl: Improve messages when configuring SSL if it is unsupported.
Previously, if --private-key or another option that requires SSL support
was used, but OVS was built without OpenSSL support, then OVS would fail
with an error message that the specified option was not supported. This
confused users because it made them think that the option had been removed:
http://openvswitch.org/pipermail/discuss/2011-April/005034.html
This commit improves the error message: OVS will now report that it was
built without SSL support. This should be make the problem clear to users.
Reported-by: Aaron Rosen <arosen@clemson.edu>
Feature #5325.
Ben Pfaff [Tue, 10 May 2011 16:15:44 +0000 (09:15 -0700)]
INSTALL.XenServer: Document Open vSwitch boot process on XenServer.
Inspired by a conversation with David Erickson <derickso@stanford.edu>.
Ben Pfaff [Mon, 9 May 2011 17:29:51 +0000 (10:29 -0700)]
ovs-vsctl: Issue warning for likely erroneous "get" commands.
Suggested-by: Reid Price <reid@nicira.com>
Feature #5527.
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.
Ethan Jackson [Mon, 2 May 2011 20:15:59 +0000 (13:15 -0700)]
ofproto: Resubmit statistics improperly account during failover.
In some cases, when a facet's actions change because it resubmits
into a different rule, it will account all packets it as accrued
in the datapath to the new rule. Due to the algorithm we are
using, it is acceptable for a facet to miscount at most 1 second
worth of packets in this manner. This patch implements the proper
behavior.
Generally speaking, when a facet is facet_put__() into the
datapath, the kernel returns the old flow's statistics so they may
be accounted for in user space. These statistics are generally
pushed down to the relevant facet's resubmit children. Before this
patch, facet_put__() did not compensate for the fact that many of
the statistics in the datapath may have been already pushed.
Thus the entire packet count stored in the datapath would be pushed
to its children instead of simply the packets which have accrued
since the last accounting. This patch fixes the behavior by
subtracting already accounted for packets from the statistics
returned by the datapath.
Ethan Jackson [Thu, 5 May 2011 23:52:56 +0000 (16:52 -0700)]
lacp: New "lacp-heartbeat" mode.
This commit creates a new heartbeat mode for LACP. This mode
treats LACP as a protocol simply for monitoring link status. It
strips out most of the sanity checks built into the protocol.
Addition of this mode makes "lacp-force-aggregatable" and
"lacp-strict" options obsolete so they are removed.
Ethan Jackson [Thu, 5 May 2011 23:01:11 +0000 (16:01 -0700)]
bond: Create new "bond-stable-id".
Stable bonding mode needs an ID to guarantee consistent slave
selection decisions across ovs-vswitchd instances. Before this
patch, we used the lacp-port-id for this purpose. However, LACP
places restrictions on how lacp-port-ids can be allocated which may
be inconvenient. This patch creates a special purpose
bond-stable-id other_config setting which allows users to tweak
this value directly.
Ethan Jackson [Thu, 5 May 2011 21:27:38 +0000 (14:27 -0700)]
bond: Convert stb_id to 32bit parameter.
The 16 bits currently in use is artificially restrictive.
Justin Pettit [Wed, 4 May 2011 06:16:46 +0000 (23:16 -0700)]
xenserver: Better document scriplet action 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.
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.
Ben Pfaff [Wed, 4 May 2011 20:46:21 +0000 (13:46 -0700)]
DESIGN: Move in-band control design discussion here.
It seems more likely that interested users and administrators will be able
to find it here.
Ben Pfaff [Wed, 20 Apr 2011 22:22:26 +0000 (15:22 -0700)]
ofproto: Update ports immediately upon ofproto_port_add() too.
I don't see a reason to defer this.
Ben Pfaff [Wed, 4 May 2011 17:38:27 +0000 (10:38 -0700)]
ofproto: Add a pointer to the owning ofproto to struct ofport.
This streamlines a few function calling interfaces.
Ben Pfaff [Wed, 20 Apr 2011 22:13:46 +0000 (15:13 -0700)]
ofproto: Initialize ports immediately upon ofproto creation.
I don't see why we should delay initializing the ports to the first call
of ofproto_run1(). We originally did initialize the ports in
ofproto_create(), but back in January 2010 Jesse moved the call into
ofproto_run1() in commit
149f577a "netdev: Fully handle netdev lifecycle
through refcounting." The commit message doesn't explain why this
particular change was made, so I can only assume that it was important at
the time. Now, however, everything seems to work fine with initialization
done in the most logical place.
Ben Pfaff [Thu, 7 Apr 2011 21:43:14 +0000 (14:43 -0700)]
dpif: Better log unusual errors in dpif_port_query_by_name().
Logging these unusual errors at a low level means that we can remove a
bit of higher-level code from ofproto.
The ofproto change also changes behavior for these error cases, from doing
nothing to removing the port, but I think that's OK. I've never noticed
this log message.
Ben Pfaff [Fri, 8 Apr 2011 00:10:48 +0000 (17:10 -0700)]
hmapx: New data structure.
Ben Pfaff [Wed, 4 May 2011 17:26:58 +0000 (10:26 -0700)]
bond: New function bond_slave_set_netdev().
To be used by an upcoming change.
Ben Pfaff [Fri, 8 Apr 2011 19:35:38 +0000 (12:35 -0700)]
ofproto: Add 'name' field to struct ofproto and use hmap instead of shash.
It's slightly inconvenient to call into dpif_name() just to get the name
of an ofproto. Furthermore, we're already keeping a copy of the ofproto's
name around, in the 'name' field of its shash_node. It seems easier all
around if we just keep the name right in the struct ofproto and use an
hmap instead of a shash.
Ben Pfaff [Tue, 5 Apr 2011 23:34:09 +0000 (16:34 -0700)]
ofproto: Rename ofproto_iface_*() functions to ofproto_port_*().
This makes ofproto use the term "port" consistently for a single
purpose (which is unfortunately different from the term "interface"
used in the OVS database, but at least it is now internally
consistent).
Ben Pfaff [Thu, 14 Apr 2011 20:16:47 +0000 (13:16 -0700)]
ofproto: Move private definitions to separate header.
Ben Pfaff [Fri, 8 Apr 2011 20:50:21 +0000 (13:50 -0700)]
bridge: Reorder configuration.
This loses the bridge_run_one() before iface_configure_cfm(), which means
that CFM configuration can now take two reconfigurations in a row. That's
a regression that we had earlier, which had been fixed previously by commit
392730c42bb "bridge: Run once before configuring CFM". It will, however,
be fixed again in a later commit.
Ben Pfaff [Tue, 5 Apr 2011 19:52:58 +0000 (12:52 -0700)]
dpif: New function dpif_normalize_type().
This allows dpif types to be compared.
Ben Pfaff [Wed, 4 May 2011 17:20:04 +0000 (10:20 -0700)]
bridge: Factor code out of bridge_reconfigure().
This is almost entirely code motion. I only made minor style changes as
I moved code around.
Ben Pfaff [Wed, 4 May 2011 17:18:23 +0000 (10:18 -0700)]
bridge: Get rid of bridge_get_all_ifaces(), bridge_fetch_dp_ifaces().
The bridge_get_all_ifaces() function is rather odd. It creates an shash
index over the "struct iface"s within a bridge, but there's already an
index over them (the 'iface_by_name' hmap in struct bridge) that the
iface_lookup() function searches. The only value it adds is to put the
names of bond fake ifaces into the index, but that's hardly worth it. We
can just search the existing hash table as needed, instead.
The bridge_fetch_dp_ifaces() function is also odd. It fetches the entire
mapping from port number to name from the dpif again, although this has
already been done twice already. We can just merge this in with the second
iteration.
This commit makes both of those changes.
Ben Pfaff [Mon, 4 Apr 2011 21:11:16 +0000 (14:11 -0700)]
bridge: Change all_bridges from list to hmap (indexed by name).
This is more convenient for looking up a bridge by name. That makes
reconfiguration a little bit simpler, because there is no longer a need to
build a temporary index of existing bridges. I don't see any downsides.
Ben Pfaff [Wed, 4 May 2011 17:15:31 +0000 (10:15 -0700)]
bridge: Eliminate direct dependencies on dpif.
The 'ofp_portp' argument of the new function ofproto_port_add() is always
set to NULL in this commit, but a future commit will use nonnull values.
Ben Pfaff [Fri, 1 Apr 2011 18:42:25 +0000 (11:42 -0700)]
bridge: Change 'iface_by_name' from shash to hmap.
This avoids having duplicate copies of interface names (inside the shash)
and it isn't any harder to work with.
Ben Pfaff [Tue, 29 Mar 2011 21:42:20 +0000 (14:42 -0700)]
Convert remaining network-byte-order "uint<N>_t"s into "ovs_be<N>"s.
I looked at almost every uint<N>_t in the tree to determine whether it was
really in network byte order, and converted the ones that were.
The only remaining ones, modulo my mistakes, are in openflow.h. I'm not
sure whether we should convert those, because there might be some value
in remaining close to upstream for this header.
Ben Pfaff [Tue, 29 Mar 2011 21:11:39 +0000 (14:11 -0700)]
ofproto: Maintain ofp_phy_port for each ofport in network byte order.
It's rather confusing to have an instance of a whole structure in an
unexpected byte order. This commit gets rid of that oddity.
Ben Pfaff [Tue, 29 Mar 2011 20:10:34 +0000 (13:10 -0700)]
ofproto: Group struct cfm forward declaration with the rest of them.
Ben Pfaff [Thu, 14 Apr 2011 20:17:09 +0000 (13:17 -0700)]
ofproto: Make ofproto_send_packet() static.
It's not used outside of ofproto.c any longer.
Ben Pfaff [Tue, 29 Mar 2011 19:23:06 +0000 (12:23 -0700)]
bridge: Use bridge name, instead of dpif name, in log messages.
This reduces the number of direct references to the dpif, which
future commits will eliminate from the bridge code.
Ben Pfaff [Tue, 29 Mar 2011 18:32:25 +0000 (11:32 -0700)]
bridge: Inline iterate_and_prune_ifaces() and remove it.
The main reason that iterate_and_prune_ifaces() existed was because it was
somewhat inconvenient to iterate across all of the interfaces, especially
if anything needed to be deleted. Now that we've switched from arrays to
lists and hmaps, it's a bit easier, and certainly it's easier to read code
when there aren't any callbacks involved, so inline what this was doing.
This was the only remaining caller of iterate_and_prune_ifaces() so this
removes that function as well as the callback.
Ben Pfaff [Wed, 4 May 2011 17:12:03 +0000 (10:12 -0700)]
bridge: Avoid extra iteration through all "struct iface"s.
There's no reason to do these separately as far as I can see.
Ben Pfaff [Wed, 4 May 2011 16:58:30 +0000 (09:58 -0700)]
ovs-tcpundump: Document that ovs-appctl sends ofproto/trace command.
Suggested-by: Reid Price <reid@nicira.com>
Bug #5538.
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>
Ben Pfaff [Tue, 3 May 2011 17:30:17 +0000 (10:30 -0700)]
ovs-brcompatd: Document bug.
Reported-by: Gregor Schaffrath <grsch@net.t-labs.tu-berlin.de>
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>
Ethan Jackson [Mon, 2 May 2011 23:33:01 +0000 (16:33 -0700)]
vswitchd: Update schema version number.
Quite a few changes to LACP and bonding have gone in recently which
allowed additional other_config parameters on ports and interfaces.
These changes should have updated the vswitch.ovsschema version
number.
Requested-by: Jeremy Stribling <strib@nicira.com>
Ben Pfaff [Thu, 28 Apr 2011 20:02:15 +0000 (13:02 -0700)]
ovs-dpctl: Add -s option to print packet and byte counters.
Ben Pfaff [Thu, 28 Apr 2011 18:13:53 +0000 (11:13 -0700)]
netdev-linux: New functions for converting netdev stats formats.
An upcoming commit will introduce another function that needs to convert
between rtnl_link_stats64 and netdev_stats, so it seemed best to just add
functions to do the conversion.
Andrew Evans [Sun, 1 May 2011 17:18:45 +0000 (10:18 -0700)]
tunneling: Add DF inherit and default flags to set of public tunnel flags.
Signed-off-by: Andrew Evans <aevans@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
Andrew Evans [Sat, 30 Apr 2011 00:05:58 +0000 (17:05 -0700)]
tunneling: Add df_default and df_inherit tunnel options.
Split existing pmtud tunnel option's functionality into three. Existing pmtud
option still exists, but now governs only whether datapath sends ICMP frag
needed messages. New df_inherit option controls whether DF bit is copied from
packet inner header to outer tunnel header. New df_default option controls
whether DF bit is set if inner packet isn't IP or if df_inherit is disabled.
Suggested-by: Jesse Gross <jesse@nicira.com>
Signed-off-by: Andrew Evans <aevans@nicira.com>
Feature #5456.
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.
Ethan Jackson [Fri, 29 Apr 2011 00:13:50 +0000 (17:13 -0700)]
datapath: Remove dead code in queue_control_packets().
Fixes the following warning:
datapath.c:473:6: warning: variable 'port_no' set but not used
[-Wunused-but-set-variable]
Signed-off-by: Ethan Jackson <ethan@nicira.com>
Ben Pfaff [Fri, 29 Apr 2011 17:49:06 +0000 (10:49 -0700)]
datapath: Drop parameters from execute_actions().
It's (almost) always easier to understand a function with fewer parameters,
so this removes the now-redundant sw_flow_key and actions parameters from
execute_actions(), since they can be found through OVS_CB(skb)->flow now.
This also necessarily moves loop detection into execute_actions().
Otherwise, the flow's actions could have changed between the time that the
loop was detected and the time that it was suppressed, which would mean
that the wrong (version of the) flow would get suppressed.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
Ben Pfaff [Thu, 28 Apr 2011 23:54:07 +0000 (16:54 -0700)]
datapath: Make every packet passing through the datapath have an sw_flow.
This way, it's always possible to get a packet's key or hash simply by
looking at its 'flow', without considering whether the packet came from
userspace or from a vport.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
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>
Ben Pfaff [Thu, 28 Apr 2011 23:13:39 +0000 (16:13 -0700)]
datapath: No need to zero cb anymore in odp_packet_cmd_execute().
Before commit
3f19d399f "datapath: Fix mysterious GRE-over-IPSEC problems,"
'packet' in opd_packet_cmd_execute() was an skb cloned from one created by
Netlink, so its cb member wasn't necessarily zeroed. But that commit
changed 'packet' to be freshly allocated with __dev_alloc_skb(), which
means that cb is zeroed, so we don't have to do it again.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
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.
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>
Jesse Gross [Thu, 14 Apr 2011 20:10:09 +0000 (13:10 -0700)]
datapath: Backport DIV_ROUND_UP.
Older kernels didn't define DIV_ROUND_UP, so this provides a
backported version.
Signed-off-by: Jesse Gross <jesse@nicira.com>
Ethan Jackson [Tue, 26 Apr 2011 22:39:58 +0000 (15:39 -0700)]
lacp: Allow configurable aggregation keys.
Users will the ability to manually set aggregation keys on a
per-slave basis in order to use some of the more advanced LACP
features. Most notably, LACP controlled active-backup bonding
requires fine grained aggregation key configuration.
Ethan Jackson [Tue, 26 Apr 2011 22:05:19 +0000 (15:05 -0700)]
lacp: New other_config setting "lacp-force-aggregatable".
In some extremely advanced situations, one may want to force
non-bondable slaves to advertise themselves as bondable. This
patch adds that capability.
Also includes some minor code cleanup.
Ethan Jackson [Wed, 27 Apr 2011 00:32:41 +0000 (17:32 -0700)]
ofproto: Remove unused variable.
Fixes the following warning:
ofproto/ofproto.c:4176:30: error: variable 'pin' set but not used
[-Werror=unused-but-set-variable]
Ethan Jackson [Wed, 27 Apr 2011 00:28:44 +0000 (17:28 -0700)]
connmgr: Remove unused variable.
Fixes the following warning:
ofproto/connmgr.c:396:11: error: variable 'ss_exists' set but not
used [-Werror=unused-but-set-variable]
Andrew Evans [Tue, 26 Apr 2011 20:58:35 +0000 (13:58 -0700)]
vswitch.xml: s/switchs/switches/g
Ethan Jackson [Thu, 21 Apr 2011 20:55:45 +0000 (13:55 -0700)]
bond: New bond-hash-basis setting.
Ethan Jackson [Mon, 25 Apr 2011 23:06:54 +0000 (16:06 -0700)]
bridge: Create new "null" interface type.
Null interfaces are completely ignored by Open vSwitch.
Ben Pfaff [Tue, 26 Apr 2011 16:42:18 +0000 (09:42 -0700)]
Remove support for obsolete "tun_id_from_cookie" extension.
The "tun_id_from_cookie" OpenFlow extension predated NXM and supports only
a fraction of its features. Nothing (at Nicira, anyway) uses it any
longer. Support for it had been broken since January and it took until a
few days ago for anyone to complain, so it cannot be too important. This
commit removes it.
Ben Pfaff [Fri, 8 Apr 2011 20:19:56 +0000 (13:19 -0700)]
mac-learning: Avoid unnecessary call to free().
Ben Pfaff [Wed, 6 Apr 2011 22:31:22 +0000 (15:31 -0700)]
mac-learning: Change mac_learning_set_flood_vlans() to not take ownership.
These new semantics are less efficient in the case where the flood_vlans
actually changed, but that should be very rare.
There are no advantages to this change on its own, but upcoming commits
will add multiple layers between the code supplying the flood_vlans and
actually calling mac_learning_set_flood_vlans(). Consistency in this
multilayered interface seems valuable, and the rest of it does not transfer
ownership from the caller to the callee.
Ben Pfaff [Fri, 8 Apr 2011 20:19:33 +0000 (13:19 -0700)]
vlan-bitmap: New data structure.
Ben Pfaff [Fri, 8 Apr 2011 20:44:38 +0000 (13:44 -0700)]
bridge: Move logic for flushing flows and standalone mode into connmgr.
This improves the abstraction behind ofproto and connmgr.
Some of this could even go into fail_open, but I'm not sure that it would
make anything easier to understand.
Ben Pfaff [Tue, 26 Apr 2011 00:08:09 +0000 (17:08 -0700)]
ovs-controller: Honor --wildcard option.
This option was documented but ignored.
Ben Pfaff [Thu, 21 Apr 2011 23:38:05 +0000 (16:38 -0700)]
tests: Add ovs-openflowd to programs that need valgrind wrappers.
The tests run ovs-openflowd so "make check-valgrind" should run it under
valgrind.
Ben Pfaff [Thu, 21 Apr 2011 23:37:38 +0000 (16:37 -0700)]
bridge: Remove slaves from the bond before closing their netdevs.
A bond slave has a pointer to its iface's netdev, so we don't want it to
keep that pointer after the bridge closes the netdev.
This is becoming a bit of a mess so perhaps we need reference counting for
netdevs (although Jesse didn't like the idea when I proposed it before).