]> git.proxmox.com Git - mirror_ovs.git/commitdiff
netdev-offload-dpdk: Support vxlan encap offload with load actions.
authorLei Wang <leiw@mellanox.com>
Thu, 30 Jul 2020 10:58:38 +0000 (10:58 +0000)
committerIlya Maximets <i.maximets@ovn.org>
Mon, 19 Oct 2020 12:48:05 +0000 (14:48 +0200)
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.

Fixes: e8a2b5bf92bb ("netdev-dpdk: implement flow offload with rte flow")
Reviewed-by: Eli Britstein <elibr@mellanox.com>
Reviewed-by: Gaetan Rivet <gaetanr@mellanox.com>
Acked-by: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
Tested-by: Emma Finn <emma.finn@intel.com>
Signed-off-by: Lei Wang <leiw@mellanox.com>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
lib/netdev-offload-dpdk.c

index 5b632bac4f266fa795576444365a3e063fda06f7..4d19f93cdb8319214358c6b695c772a8fdef521d 100644 (file)
@@ -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(&consumed_masks->tunnel, 0, sizeof consumed_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) {