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>
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>
ofproto-dpif: Improve help output for ofproto/trace.

Signed-off-by: Ben Pfaff <blp@nicira.com>
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>
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>
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>
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>
odp-util: Fix IPFIX breakage with old kernel modules.

Before commit e995e3df57ea (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>
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>
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>
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>
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>
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>
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>
dpif: Document datapath masking.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Andy Zhou <azhou@nicira.com>
netlink: Do not enforce alignment of last Netlink attribute

There is no reason to enforce padding after the last attribute.
Dropping this enforcement will ease efforts to implement zerocopy
upcall.

Signed-off-by: Thomas Graf <tgraf@redhat.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
dpif-netdev: Introduce a classifier in userspace datapath.

Instead of an exact match flow table, we introduce a classifier.
This enables mega-flows in userspace datapath.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
[blp@nicira.com tweaked flow lookup]
Signed-off-by: Ben Pfaff <blp@nicira.com>
ovs-ofctl: Document masked versions of arp_sha and arp_tha matches

Document masked versions of arp_sha and arp_tha matches.
Also update documentation of unmasked versions of these
matches to include an example address as is the case with
the documentation of dl_src and dl_dst.

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
ofproto-dpif: test ARP SPA and TPA load actions

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
ovs-ofctl: Document mpls_{label,bos,tc} matches

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>