2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-30 13:58:14 +00:00
Commit Graph

7206 Commits

Author SHA1 Message Date
Ben Pfaff
ee75c5460e dpif: Document datapath masking.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Andy Zhou <azhou@nicira.com>
2013-11-12 17:11:17 -08:00
Ravi Kondamuru
9dd165e050 bond: Use active-backup mode on LACP failure.
Commit bdebeece5 (lacp: Require successful LACP negotiations when
configured.) makes successful LACP negotiation mandatory for the
bond to come UP. This patch provides a configuration option to
bring up the bond by falling back to active-backup mode on LACP
negotiation failure.

Several of the physical switches that support LACP block all traffic
for ports that are configured to use LACP, until LACP is negotiated
with the host. When configuring a LACP bond on a OVS host
(eg: XenServer), this means that there will be an interruption of the
network connectivity between the time the ports on the physical
switch and the bond on the OVS host are configured. The interruption
may be relatively long, if different people are responsible for
managing the switches and the OVS host.

Such network connectivity failure can be avoided if LACP can be
configured on the OVS host before configuring the physical switch,
and having the OVS host fall back to a bond mode (active-backup) till
the physical switch LACP configuration is complete. An option
"lacp-fallback-ab" is introduced with this patch to provide such
behavior on openvswitch.

Signed-off-by: Ravi Kondamuru <Ravi.Kondamuru@citrix.com>
Signed-off-by: Dominic Curran <Dominic.Curran@citrix.com>
Signed-off-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
2013-11-12 14:22:48 -08:00
Simon Horman
3767b63136 ofproto: Add enum ofp_table_config
Cc: Andy Zhou <azhou@nicira.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-11-12 08:46:47 -08:00
Simon Horman
083761ad80 ofproto: Add enum ofp_table
Add enum ofp_table and use it for Flow Mod.

Cc: Andy Zhou <azhou@nicira.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-11-12 08:38:22 -08:00
Alfredo Finelli
11bd0a533c debian: Avoid logrotate error if /var/run/openvswitch does not exist.
Signed-off-by: Alfredo Finelli <alf@computationes.de>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-11-12 08:04:17 -08:00
Saurabh Shah
3a5ded905b ovs-dev.py: Remove duplicate name from the help string.
Signed-off-by: Saurabh Shah <ssaurabh@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-11-11 14:17:35 -08:00
Ben Pfaff
b075a9b855 odp-util: Fix formatting of ipfix action cookies, to fix a testsuite failure
Problem introduced by previous commit 96ed775f19 (odp-util: Fix IPFIX
breakage with old kernel modules.)

Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-11-11 13:32:23 -08:00
Ben Pfaff
96ed775f19 odp-util: Fix IPFIX breakage with old kernel modules.
Before commit e995e3df57 (Allow OVS_USERSPACE_ATTR_USERDATA to be
variable length.) userdata attributes in userspace actions were expected
to be exactly 64 bits long.  The kernel only actually enforced that they
were at least 64 bits long (the previously referenced commit's log message
contains misinformation on this account).

Initially this was no problem, because all of the userdata that userspace
actually used was exactly 8 bytes long.  Commit 29089a540c (Implement IPFIX
export), however, exposed a problem by reducing the length of userdata for
IPFIX support to just 4 bytes.  This meant that IPFIX no longer worked on
older datapaths, because the userdata was no longer at least 8 bytes long.

This commit fixes the problem by padding out userdata attributes less than
8 bytes long to 8 bytes.

CC: Romain Lenglet <rlenglet@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Romain Lenglet <rlenglet at vmware.com>
2013-11-11 13:02:58 -08:00
Ben Pfaff
9ddf12cc12 netlink: New function nl_msg_put_unspec_zero().
This function already had a few potential users, which this commit
converts.  An upcoming commit adds more users.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-11-11 13:02:58 -08:00
Ben Pfaff
d1ba66e9ff ovs-ofctl: Improve manpage.
Fixes misspelling of "OpenFlow".

Fixes the indentation of the paragraph beginning "Any \fIreason\fR...".

Changes "target" to "action" in the introduction of actions, which seems
like a better name.

Reorders action descriptions to group all the simple forms of output
together.

Consistently mentions that output actions don't output to the input port.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-11-11 10:58:10 -08:00
Ben Pfaff
b55f2f799b ofp-actions: Switch away from odd use of "q" in "enqueue" action format.
The formatting of the "enqueue" action uses a "q" to separate the port
number from the queue number, as in "enqueue:123q456".  This is different
from every other action.  This commit improves the situation by:

    * Switching the formatting to use a colon (e.g. "enqueue:123:456"),
      which is a little less odd-looking but still accepted by older
      versions of Open vSwitch.

    * Improving the parser to accept "enqueue(123,456)" also.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-11-11 10:58:10 -08:00
Ben Pfaff
aee0979b2c ofproto-dpif: New unixctl command ofproto/trace-packet-out.
Feature #20543.
Requested-by: Ronghua Zhang <rzhang@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-11-11 10:50:47 -08:00
Ben Pfaff
dc8ce81f12 ofproto-dpif: Improve help output for ofproto/trace.
Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-11-11 10:38:08 -08:00
Ben Pfaff
b6f00895c1 ofproto-dpif: Factor code out of ofproto_unixctl_trace().
This new function will have an additional caller in an upcoming commit.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-11-11 10:37:58 -08:00
Ben Pfaff
70d0aed308 ovs-ofctl: Document a few Nicira extensions as standardized in OF1.1+.
The update is incomplete, so document that also.

Reported-by: Stephen Finucane <stephen.finucane@intel.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-11-11 08:52:06 -08:00
Ben Pfaff
17f69db575 ofproto: Check ofproto_port_query_by_name() return value when adding port.
Otherwise, if the port add succeeds but the query that looks up the port
number fails, then ofproto_port_add() would return zero as the OpenFlow
port number and ignore the error.

Reported-by: Guolin Yang <gyang@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-11-11 08:42:08 -08:00
Joe Stringer
fb668e3a13 cfm: Count flaps when logging is disabled
Previously, the flap count logic for CFM was dependent on the state of
the logging facility. This patch ensures flaps are always counted when
there is a transition between non-fault and fault (and vice versa).

Found by inspection.

Signed-off-by: Joe Stringer <joestringer@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-11-11 08:31:37 -08:00
Joe Stringer
89eb6a4313 netdev: Make naming more consistent
netdev-dummy and netdev-vport use the function name netdev_poll_notify()
for the same purpose as netdev-linux/bsd's netdev_*_changed(). This patch
changes the former two to be more consistent with the linux/bsd naming
scheme.

Signed-off-by: Joe Stringer <joestringer@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-11-11 08:00:12 -08:00
Ben Pfaff
484c8355de ofproto: Limit OVS-assigned port numbers to 32767 and below.
A couple of controller vendors have mentioned to me that they would like to
have some part of the OpenFlow port number space reserved for the
controller to use.  This commit reserves 32768 and up (roughly the upper
half of the OF1.0 port range) to the controller.

Bug #18753.
Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-11-06 16:12:34 -08:00
Gurucharan Shetty
9f5bbb005c ofproto-dpif: Disassociate datapath max_ports with openflow port numbers.
With single datapath, multiple userspace bridges share the same datapath.
As such it does not look beneficial that we decide a valid open flow port
number based on the number of ports in the datapath specially now that
we have the ofport_request column in OVSDB.

This commit does not remove ofproto_init_max_ports() interface as defined
in ofproto-provider.h as there may be other implementations that still use it.
But ofproto-dpif should not need it.

Bug #20163.
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2013-11-06 07:25:06 -08:00
Gurucharan Shetty
ccb0ca0333 ovs-bugtool: Remove reference to an undefined variable.
commit 1d5aaa61f (ovs-controller: Rename test-controller and do not
install or package.) removed a variable definition but not its use.
Fix it.

Bug #20901.
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Joe Stringer <joestringer@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2013-11-05 13:22:07 -08:00
Ben Pfaff
13b1febe4f ofp-util: Report OFPMMFC_BAD_FLAGS for bad band flags.
It doesn't make sense to specify both kbps and pkt/s, because the two units
are mutually exclusive.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
2013-11-05 09:47:02 -08:00
Ben Pfaff
142cdb018d ofp-util: Report OFPMMFC_BAD_COMMAND for bad meter mod commands.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
2013-11-05 09:46:53 -08:00
Ben Pfaff
f99d6aa01f ofp-util: Report OFPMMFC_BAD_BAND for bad band type in meter mod decoding.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
2013-11-05 09:46:44 -08:00
Ben Pfaff
b2a27ddc46 ofp-actions: Allow meter actions in ofpacts_verify().
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
2013-11-05 09:46:32 -08:00
Ben Pfaff
e34afc3fe5 OPENFLOW-1.1+: Update item describing status of meters.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
2013-11-05 09:46:23 -08:00
Ben Pfaff
1a8def8eca ofpbuf: Allow whitespace other than spaces in hex data.
It's easier to cut and paste lines of hexadecimal data into a command line
if you don't have to worry about new-lines appearing in the command.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
2013-11-05 09:46:12 -08:00
Ben Pfaff
f0e7025f7e ofproto: report the correct set of actions for group features
do not report OF1.1 bits (set_dl_src etc) as group features is OF1.2+.

LINC seems to use 1<<31 for experimenter action type but i failed to
find it in the spec.

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
[blp@nicira.com added a comment to ofp-util.h]
Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-11-04 21:14:53 -08:00
alex wang
76c4290d8a cfm: Add ovsdb column "cfm_flap_count".
This commit adds a new ovsdb column "cfm_flap_count".  It counts the
number of cfm fault flaps since boot.

Signed-off-by: Alex Wang <alexw@nicira.com>
Signed-off-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
2013-11-04 14:46:28 -08:00
Ben Pfaff
36d29fc41b OPENFLOW-1.1+: Groups are now supported.
CC: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Simon Horman <horms@verge.net.au>
2013-11-04 11:12:57 -08:00
Gurucharan Shetty
1763b4b8d8 dpif-netdev: Change a variable name.
'struct dp_netdev_flow' is currently being instantiated as 'flow'.
An upcoming commit introduces a classifier to dpif-netdev
which uses 'struct flow' at a few places and that can cause
confusion while reading code.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2013-11-04 07:26:55 -08:00
Ben Pfaff
8ea3791cc4 classifier: Update thread safety notes.
Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-11-02 21:31:07 -07:00
Ben Pfaff
f67c329519 daemon: Precisely document signals that cause the monitor to restart.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Joe Stringer <joestringer@nicira.com>
2013-11-02 21:24:21 -07:00
Ben Pfaff
1d5aaa61fa ovs-controller: Rename test-controller and do not install or package.
Too many users have incorrectly assumed that ovs-controller is a necessary
or desirable part of an Open vSwitch deployment.  This commit should fix
the problem by renaming it test-controller and removing it from the
default install and from packaging.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-11-02 21:06:45 -07:00
Joe Stringer
19c8e9c11b netdev-linux: Skip miimon execution when disabled
When dealing with a large number of ports, one of the performance
bottlenecks is that we loop through all netdevs in the main loop. Miimon
is a contributor to this, checking all devices even if it has never been
enabled.

This patch introduces a counter for the number of netdevs with miimon
configured. If this is 0, then we skip miimon_run() and miimon_wait().
In a test environment of 5000 internal ports and 50 tunnel ports with
bfd, this reduces CPU usage from about 50% to about 45%.

Signed-off-by: Joe Stringer <joestringer@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-11-02 20:53:10 -07:00
Simon Horman
7cb279c202 ofproto-dpif: Support weight for select groups
Signed-off-by: Simon Horman <horms@verge.net.au>
[blp@nicira.com adjusted this for highest random weight scoring and
 updated the test]
Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-11-02 19:32:12 -07:00
Simon Horman
fe7e574970 ofproto-dpif: Implement translation of select groups.
Select bucket from those that are alive based on a hash of the destination
ethernet address of the packet.

Support for weights is proposed by a subsequent patch.

The selection is based on a hash of the destination ethernet
address of the flow. It should be possible to extend
this to cover a hash of user-specified elements of the flow.

Signed-off-by: Simon Horman <horms@verge.net.au>
[blp@nicira.com replaced bucket selection by "highest random weight"
 method]
Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-11-02 19:18:40 -07:00
Simon Horman
dd8cd4b437 ofproto-dpif: Translation of fast failover groups
Fast failover groups use the actions in
the first bucket that is alive.

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-11-02 18:07:15 -07:00
Simon Horman
0860fea782 ofproto: Add test for flow mod with groups.
Test that flow mod with groups succeeds only if the group exists.

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-11-02 18:05:13 -07:00
Simon Horman
433702fcc8 ofproto: Add del groups test
Lightly exercise del-groups

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-11-02 17:56:41 -07:00
Simon Horman
2134b5ec7d ofproto: Add group desc and stats tests
Lightly exercise group desc and stats

Signed-off-by: Simon Horman <horms@verge.net.au>
[blp@nicira.com found that a new test segfaulted and folded in fixes]
Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-11-02 17:55:29 -07:00
Simon Horman
f4fb341b51 ofproto-dpif: Translation of indirect and all groups
Allow translation of indirect and all groups.  Also allow insertion of
indirect and all groups by changing the maximum permitted number in the
groups table from 0 to OFPG_MAX.

Implementation note:

After translating the actions for each bucket ctx->flow is reset to its
state prior to translation of the buckets actions. This is equivalent to
cloning the bucket before applying actions. This is my interpretation of the
OpenFlow 1.3.2 specification section 5.6.1 Group Types, which includes the
following text. I believe there is room for other interpretations.

* On all groups: "The packet is effectively cloned for each bucket; one
  packet is processed for each bucket of the group."
* On indirect groups: "This group type is effectively identical to an
  all group with one bucket."

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-11-02 12:01:14 -07:00
Simon Horman
bd3240ba0c ofproto: Break out resubmit resource checking
Break out resubmit resource checking into a helper function
xlate_resubmit_resource_check() and use this new function.
This is to allow the check to be re-used by a subsequent patch.

Suggested-by: Ben Pfaff <blp@nicira.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-11-02 11:58:06 -07:00
Simon Horman
f2e99d5dd4 ofproto: Add enum ofp_group_capabilities
These values will be used by subsequent patches

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-11-02 11:56:04 -07:00
Simon Horman
ddc627ad44 ofproto: Advertise all supported OpenFlow actions in group features
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-11-02 11:47:28 -07:00
Ben Pfaff
03848f80ab nicira-ext: Update comment.
The ARP headers have been acceptable as NXAST_REG_MOVE destinations since
commit f6c8a6b163 (Add software switch support for modifying ARP headers
in OpenFlow.)

Reported-by: Anupam Chanda <achanda@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Joe Stringer <joestringer@nicira.com>
2013-11-02 11:36:50 -07:00
Ben Pfaff
0f032e95d8 ofproto-dpif-xlate: Handle oversized actions more gracefully.
If the datapath actions exceed the maximum size of a Netlink attribute
(about 64 kB), then previously we would assert-fail (before commit
542024c4c3 "ofproto-dpif-xlate: Suppress oversize datapath actions.")
or just drop all of them (after that commit).  This commit makes OVS cope
by slow-pathing the flow and executing all of its actions in userspace.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-11-02 08:43:14 -07:00
Ben Pfaff
e5f1da1994 FAQ: Elaborate further on how one drops packets with OpenFlow.
Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-11-02 08:27:11 -07:00
Ben Pfaff
bc47dcfdf3 bfd: Improve log message.
Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-11-02 08:13:35 -07:00
Ben Pfaff
b322d9baed flow: Fill in ->l7 in flow_compose().
flow_extract() fills in ->l7 but flow_compose() wasn't doing it, which
confused bfd_process_packet() when invoked via the ofproto/trace appctl
command.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-11-02 08:13:35 -07:00