lib/odp-util: Do not use mask if it doesn't exist.

Diagnostic code path dereferenced a NULL pointer.

Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Reviewed-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
ofproto-dpif: Correct documentation of rule_dpif_lookup_from_table()

This corrects an editing error that was added by 6b83a3c5c37a0711
("ofproto: Support OF version-specific table-miss behaviours").

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Andy Zhou <azhou@nicira.com>¬
ofproto-dpif: Correct typo in documentation of rule_dpif_lookup()

This corrects a typo that was added by adcf00ba35a0ce9c
("ofproto/bond: Implement bond megaflow using recirculation").

Cc: Andy Zhou <azhou@nicira.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Andy Zhou <azhou@nicira.com>¬
datapath: Orphan frags in skb_zerocopy and handle errors

This is the ported version of commit 36d5fe6a with the same name from net-next.
Apart from the small datapath.c changes it adjust the compat layer files as
well. This is the original commit message:

"skb_zerocopy can copy elements of the frags array between skbs, but it doesn't
orphan them. Also, it doesn't handle errors, so this patch takes care of that
as well, and modify the callers accordingly. skb_tx_error() is also added to
the callers so they will signal the failed delivery towards the creator of the
skb."

Signed-off-by: Zoltan Kiss <zoltan.kiss@citrix.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
ofproto/bond: Minor cleanups.

Add a constant for the number of bond buckets, and other minor cleanups.

Signed-off-by: Joe Stringer <joestringer@nicira.com>
Signed-off-by: Andy Zhou <azhou@nicira.com>¬
ofproto/bond: Protect statistics with writelock.

dcf00ba35a0 (ofproto/bond: Implement bond megaflow using recirculation)
allowed bond_entry statistics to be modified while holding a readlock.
This patch modifies bond_entry_account() to get a writelock before
modifying the statistics and adds thread-safety annotations to these
fields and relevant functions.

Signed-off-by: Joe Stringer <joestringer@nicira.com>
Signed-off-by: Andy Zhou <azhou@nicira.com>¬
ofproto-macros.at: Assert daemon commands creates pidfile before exiting

I observed that "ofproto-dpif - ofproto-dpif-monitor 2" test,
which merely accesses ovsdb, failed in OVS_VSWITCHD_STOP's
"ovs-appctl -t ovs-vswitchd exit".  This commit tries to catch
the problem earlier by sprinkling AT_CHECKs.
ofproto-dpif.at: Fix some races

These races were exposed on my environment by commit c2a77f33.
("tests/ofproto-dpif: Use vlog to test dpif behaviour.")
ofproto-dpif.at: Use OVS_APP_EXIT_AND_WAIT where appropriate

Leftover of commit 0c473314.
("ofproto-dpif.at: Wait for the monitor's pidfile disappears where necessary")
ofproto-dpif.at: Fix races in dpif/dump-flows test
flow.h: Fix a comment typo
ofproto-dpif: Whitespace fixes