mac-learning: Simplify mac_learning_changed().

With this patch, the mac_learning module takes responsibility for
remembering tags which need revalidation after a
mac_learning_changed() call.  This removes one of
ofproto-dpif-xlate's dpif_backer uses.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
ofproto-dpif: Verify backer in ofport_get_peer().

This marginally simplifies the code, and removes a reference to
dpif_backer from ofproto-dpif-xlate.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
ofproto-dpif: Hide struct dpif_backer.

This patch removes the last reference to dpif_backer from
ofproto-dpif-xlate, and moves it's definition into ofproto-dpif.c.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
ofproto-dpif: Hide struct priority_to_dscp.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
datapath: make skb->csum consistent with rest of networking stack.

As suggested by Jesse in the comment for patch "gre: Restructure
tunneling", following patch keeps skb->csum correct across ovs.

Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
ovsdb-server: Preserve remotes across crash and restart.

Commit b421d2af0ab (ovsdb-server: Add commands for adding and removing
remotes) made it possible to make ovsdb-server connect to OVS managers only
after ovs-vswitchd has completed its initial configuration.  But this
results in an undesirable effect: whenever ovsdb-server crashes, the
monitor restarts its, but ovsdb-server can no longer connect to the manager
because the remotes were added during runtime and that information is lost
during the crash.

This commit fixes the problem.

Signed-off-by: Ben Pfaff <blp@nicira.com>
ofproto-dpif-xlate: Remove useless variable in patch port logic.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
lib/netdev-linux.c: Prevent receiving of sent packets

Commit 796223f5 (netdev: Add new "struct netdev_rx" for capturing packets
from a netdev) refactored send and receive into separate netdevs.  As a
result, send and receive now use different socket descriptors (except for tap
interfaces which are treated specially).  An unintended side effect was that
all sent packets are looped back and received, which had previously been
avoided as the kernel specifically prevents this from happening on a single
socket descriptor.

To resolve the situation, a socket filter is added to the receive socket
so that it only accepts inbound packets.

Simon Horman co-discovered and initially reported this issue.

Signed-off-by: Murphy McCauley <murphy.mccauley@gmail.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Tested-by: Simon Horman <horms@verge.net.au>
Reviewed-by: Simon Horman <horms@verge.net.au>