ping

On 7/30/2020 1:58 PM, Eli Britstein wrote:
From: Lei Wang <l...@mellanox.com>

Struct match has the tunnel values/masks in
match->flow.tunnel/match->wc.masks.tunnel.
Load actions such as load:0xa566c10->NXM_NX_TUN_IPV4_DST[],
load:0xbba->NXM_NX_TUN_ID[] are utilizing the tunnel masks fields,
but those should not be used for matching.
Offloading fails if masks is not clear. Clear it if no tunnel used.

Signed-off-by: Lei Wang <l...@mellanox.com>
Reviewed-by: Eli Britstein <el...@mellanox.com>
Reviewed-by: Gaetan Rivet <gaet...@mellanox.com>
Signed-off-by: Eli Britstein <el...@mellanox.com>
---
  lib/netdev-offload-dpdk.c | 4 ++++
  1 file changed, 4 insertions(+)

diff --git a/lib/netdev-offload-dpdk.c b/lib/netdev-offload-dpdk.c
index de6101e4d..0d23e4879 100644
--- a/lib/netdev-offload-dpdk.c
+++ b/lib/netdev-offload-dpdk.c
@@ -682,6 +682,10 @@ parse_flow_match(struct flow_patterns *patterns,
consumed_masks = &match->wc.masks; + if (!flow_tnl_dst_is_set(&match->flow.tunnel)) {
+        memset(&match->wc.masks.tunnel, 0, sizeof match->wc.masks.tunnel);
+    }
+
      memset(&consumed_masks->in_port, 0, sizeof consumed_masks->in_port);
      /* recirc id must be zero. */
      if (match->wc.masks.recirc_id & match->flow.recirc_id) {
_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to