test-atomic: Drop atomic read-modify-write tests for the moment.

XenServer builds are failing because of link errors reporting that
__sync_fetch_and_<op>_<size> were not found, for <op> in add/sub/and/xor/or
and <size> in 1/2/4/8.  We're not actually using these RMW operations yet,
so as a stopgap measure just drop the tests.

The correct long-term fix is probably to do Autoconf linkage tests for
these operations instead of just testing the GCC version (if we really need
the operations at all).

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

fix a typo in the following commit.

> commit 10a89ef04df5669c5cdd02f786150a7ab8454e01
> Author: Ben Pfaff <blp@nicira.com>
> Date:   Mon Jun 24 10:54:49 2013 -0700
>
>     Replace all uses of strerror() by ovs_strerror(), for thread safety.
>
>     Signed-off-by: Ben Pfaff <blp@nicira.com>

Signed-off-by: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
Signed-off-by: Justin Pettit <jpettit@nicira.com>
datapath: Fix tunnel source port selection for mega flow

Tunnel source port selection was based on hash value cached in the
flow. This no longer works with mega flow, since all flows matching
a mega flow will be transmitted with the same tunnel source port.

This patch computes the tunnel source port at run time based on each
incoming packet. Packets belong to the same micro flow would still get
the same source port, but multiple micro flows hitting the same mega flow
can get different source ports.

Packets injected from the usespace will be assigned to the same
source port as if they are forwarded in the kernel.

Bug #18216

Signed-off-by: Andy Zhou <azhou@nicira.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
odp-util: Always encode mask of 0xffff for dl_type < ETH_TYPE_MIN.

For non-Ethernet II packets, we don't set an EtherType netlink attribute
and set the Ethertype mask attribute to 0xffff.  The code was encoding
whatever mask was passed in, which could lead to bugs if the caller
didn't know the userspace-kernel interface.

Found by inspection.

Signed-off-by: Justin Pettit <jpettit@nicira.com>
Acked-by: Andy Zhou <azhou@nicira.com>
odp-util: Clearly indicate VID mask is printed in hex.

Signed-off-by: Justin Pettit <jpettit@nicira.com>
Acked-by: Andy Zhou <azhou@nicira.com>
datapath: Fix version check in compat gre.h

Taken the version checks in datapath/linux/compat/gre.c this seems correct.

Signed-off-by: Jarno Rajahalme <jarno.rajahalme@nsn.com>
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
datapath: Use RCU lock for flow dump operation.

Flow dump operation is read-only operation.  There is no need to
take ovs-lock.  Following patch use rcu-lock for dumping flows.

Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
datapath: add netlink error message to help kernel userspace integration.

When kernel rejects a netlink message, it usually returns EINVAL
error code to the userspace. The actual reason for rejecting the
netlinke message is not available, making it harder to debug netlink
issues.  This patch adds kernel log messages whenever a netlink message
is rejected with reasons. Those messages are logged at the info level.

Those messages are logged only once per message, to keep kernel log noise
level down. Reload the kernel module to re-enable already logged
messages.

The messages are meant to help developers to debug userspace and kernel
intergration issues. The actual message may change or be removed over time.
These messages are not expected to show up in a production environment.

Signed-off-by: Andy Zhou <azhou@nicira.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
tests: Add test-atomic to .gitignore.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
ofp-parse: Do not exit() upon a parse error.

Until now, failure to parse a flow in the ofp-parse module has caused the
program to abort immediately with a fatal error.  This makes it hard to
use these functions from any long-lived program.  This commit fixes the
problem.

Signed-off-by: Ben Pfaff <blp@nicira.com>
BFD: Add forwarding_override command for BFD.

Added appctl commands to override the bfd forwarding status. Values
of true/false/normal are allowed. When set to normal, the bfd
forwarding status is left unchanged. Else, the forwarding status is
set to the specified value - true/false.

Signed-off-by: Pavithra Ramesh <paramesh@vmware.com>
Signed-off-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
bridge: Add ifindex column to Interface table.

This commit adds an "ifindex" column to the "Interface" table in the db.

Signed-off-by: Neil McKee <neil.mckee@inmon.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
bitmap: Fix bitmap_allocate1() bug when n_bits is a multiple of 32.

In function bitmap_allocate1(), the last "unsigned long" in bitmap was
set to all 0-bits when (n_bits % BITMAP_ULONG_BITS == 0).  This commit
correctly sets it to all 1-bits.

Signed-off-by: ZhengLingyun <konghuarukhr@163.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
DESIGN: Fix typo in "VLAN Matching" section.

Signed-off-by: Ben Pfaff <blp@nicira.com>