ofp-actions: Fix the check for instruction ordering and duplication.

Open vSwitch enforces that, when instructions appear as Nicira extensions
in OpenFlow 1.0 action lists, the instructions appear in the order that
an OpenFlow 1.1+ switch would execute them and that no duplicates appear.
But the check wasn't general enough, because it had been implemented when
only one instruction was implemented and never later generalized.  This
commit fixes the problem.

One of the tests was actually testing for the wrong behavior that the
check implemented, so this commit corrects that test.  It also updates
another test with updated log messages.

Reported-by: Jing Ai <ai_jing2000@hotmail.com>
Tested-by: Jing Ai <ai_jing2000@hotmail.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
ofproto-dpif: New function ofproto_receive().

Before translating a datapath flow key into actions, ofproto-dpif
must parse it, tweak it, and figure out what ofproto_dpif it
belongs to.  This patch brings all this logic into one place where
it will be easier to extend in the future.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
netdev-vport: Fix theoretical null pointer dereference.

Theoretically, its possible for netdev_get_status() to be called
on a netdev-vport which hasn't had its configuration set yet.  In
this case, netdev-vport would dereference a null pointer.

Reported-by: Jesse Gross <jesse@nicira.com>
Signed-off-by: Ethan Jackson <ethan@nicira.com>
netdev: Rename get_drv_info() to get_status().

get_status() is a much more intuitive name since "status" is what
the database column is called.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
netdev-vport: New helper netdev_vport_get_dev().

Signed-off-by: Ethan Jackson <ethan@nicira.com>
vswitch: Remove PMTUD support from userspace.

This patch removes path MTU discovery from userspace.  The feature
still exists in the kernel where it will need to be removed in the
future.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
netdev-vport: Manage ethernet addresses in userspace.

Letting netdev-vport manage ethernet addresses itself instead of
relying on the datapath has several advantages.  It simplifies the
code, is significantly more efficient, and will work when there is
no longer a one to one mapping from netdev-vports to datapath
vports.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
ovs-ofctl: Document to work with any OpenFlow switch.

I've always intended ovs-ofctl to work with any OpenFlow switch, not just
with Open vSwitch.  This explicitly documents that intention.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
manpages: Put version number instead of date at bottom of page.

We're really good about keeping manpages up to date, but terrible at
updating the dates at the bottom of the manpages.  So, instead of using
manually updated dates, this commit switches to using automatically updated
version numbers.

We can only use automatically updated version numbers for manpages that
we preprocess, that is, the manpages whose sources end with ".in".  This
excludes a couple of manpages that don't actually get installed with OVS,
such as the manpages for ovs-ctl and ovsdb-idlc.  This commit doesn't
change those manpages.  It does change the ovs-bugtool manpage to one that
is preprocessed so that we can use the version there.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
FAQ: Remove doubled "modified" in FAQ answer.

Signed-off-by: Ben Pfaff <blp@nicira.com>
vconn: Fix parameters for vconn_open(), vconn_open_block(), pvconn_open().

The customary parameter order in Open vSwitch is to put input parameters
before output parameters, but vconn_open() and pvconn_open() had the 'dscp'
input parameter at the end, which bugged me a bit.  Also,
vconn_open_block() didn't take a 'dscp' parameter at all even though it's
otherwise a wrapper around vconn_open().  This commit fixes all that up.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
manpages: Fix build

This patch fixes regressions in the dist and distclean targets, and in
the Debian build process, that were introduced by commit d2cb6c956b
(manpages: Put version number instead of date at bottom of page.).

Signed-off-by: Saul St. John <sstjohn@cs.wisc.edu>
Signed-off-by: Ben Pfaff <blp@nicira.com>
ovs-vsctl.8: Add an example to configure openflow version.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Ben Pfaff <blp@nicira.com>
include/linux/openvswitch.h: Make OVSP_LOCAL 32-bit.

ODP ports are now 32-bit, so OVSP_LOCAL should be too.
(Internally, kernel module still keeps port numbers 16-bit, though.)

Signed-off-by: Jarno Rajahalme <jarno.rajahalme@nsn.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
bond: Correct comments.

Signed-off-by: Ben Pfaff <blp@nicira.com>
CC: Zoltan Kiss <zoltan.kiss@citrix.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
manpages.mk: Install auto-generated update.

Signed-off-by: Ben Pfaff <blp@nicira.com>
rconn: Avoid memory leak in rconn_send_with_limit() on queue overflow.

Bug #14357.
Reported-by: Luca Giraudo <lgiraudo@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
bond: Change rebalance ratio to be more fair

The old algorithm tries to converge to 0, despite it would mean a very
unbalanced situation. We're aiming for an ideal ratio of 1, meaning both
the 'from' and 'to' slave have the same load.  Therefore, we only move an
entry if it decreases the load on 'from', and brings us closer to equal
traffic load.

Signed-off-by: Zoltan Kiss <zoltan.kiss@citrix.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
bugtool: Add manpage to gitignore.

Signed-off-by: Ethan Jackson <ethan@nicira.com>