Re-order skb_mark in odp_flow_key_from_flow() so that it appears after the
in_port rather than before. This is consistent with the order in
ovs_flow_to_nlattrs().

Without this change update_stats() detects all flows with a non-zero
skb_mark as unexpected flows as the flow key received from the kernel
datapath does not match the one present in ovs-vswtichd.

It would appear that there have been no recent uses of matches on skb_mark.

Signed-off-by: Simon Horman <ho...@verge.net.au>
---
 lib/odp-util.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/odp-util.c b/lib/odp-util.c
index 1a3e386..6c23ccd 100644
--- a/lib/odp-util.c
+++ b/lib/odp-util.c
@@ -1522,14 +1522,14 @@ odp_flow_key_from_flow(struct ofpbuf *buf, const struct 
flow *flow,
         tun_key_to_attr(buf, &flow->tunnel);
     }
 
-    if (flow->skb_mark) {
-        nl_msg_put_u32(buf, OVS_KEY_ATTR_SKB_MARK, flow->skb_mark);
-    }
-
     if (odp_in_port != OVSP_NONE) {
         nl_msg_put_u32(buf, OVS_KEY_ATTR_IN_PORT, odp_in_port);
     }
 
+    if (flow->skb_mark) {
+        nl_msg_put_u32(buf, OVS_KEY_ATTR_SKB_MARK, flow->skb_mark);
+    }
+
     eth_key = nl_msg_put_unspec_uninit(buf, OVS_KEY_ATTR_ETHERNET,
                                        sizeof *eth_key);
     memcpy(eth_key->eth_src, flow->dl_src, ETH_ADDR_LEN);
-- 
1.7.10.4

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to