ofproto-dpif-xlate: Harmonize naming of internal functions.

It would be good to be able to harminize the use of "xlate", "execute",
"compose", etc.  "xlate" clearly relates to the use of the various
translation context structures, but the distinction between "execute" and
"compose" is not that clear, so these names could be going either way.
Choose to go with "compose", keeping with the older tradition.

Signed-off-by: Jarno Rajahalme <jarno.rajahalme@nsn.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
ofproto-dpif-xlate: Make code more readable via 'flow' and 'wc' locals.

'ctx->xin->flow' and 'ctx->xout->wc' are both pretty long.  Where it gets
in the way of code readability, this patch replaces them by 'xin' and
'xout' using local variables.

Also, replace an explicit comparison against IP and IPv6 Ethertypes by
a call to is_ip_any().

Co-authored-by: Jarno Rajahalme <jarno.rajahalme@nsn.com>.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
ofp-print: Avoid returning static data.

Returning a static data buffer makes code more brittle and definitely
not thread-safe, so this commit switches to using a caller-provided
buffer instead.

Signed-off-by: Ben Pfaff <blp@nicira.com>
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>