[ovs-dev] [PATCH branch-2.13] netdev-offload-dpdk: Fix for broken ethernet matching HWOL for XL710 NIC

Emma Finn emma.finn at intel.com
Thu Aug 6 15:18:27 UTC 2020


The following commit introduced changes which caused a regression
for XL710 devices and functionality ceases for partial offload as a result.
864852a0624a ("netdev-offload-dpdk: Fix Ethernet matching for type only.")

Fixed by reversion of these changes.

Signed-off-by: Emma Finn <emma.finn at intel.com>
---
 lib/netdev-offload-dpdk.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/lib/netdev-offload-dpdk.c b/lib/netdev-offload-dpdk.c
index f97b8f8..c7f25b2 100644
--- a/lib/netdev-offload-dpdk.c
+++ b/lib/netdev-offload-dpdk.c
@@ -565,8 +565,7 @@ parse_flow_match(struct flow_patterns *patterns,
     uint8_t proto = 0;
 
     /* Eth */
-    if (match->wc.masks.dl_type ||
-        !eth_addr_is_zero(match->wc.masks.dl_src) ||
+    if (!eth_addr_is_zero(match->wc.masks.dl_src) ||
         !eth_addr_is_zero(match->wc.masks.dl_dst)) {
         struct rte_flow_item_eth *spec, *mask;
 
@@ -582,6 +581,15 @@ parse_flow_match(struct flow_patterns *patterns,
         mask->type = match->wc.masks.dl_type;
 
         add_flow_pattern(patterns, RTE_FLOW_ITEM_TYPE_ETH, spec, mask);
+    } else {
+        /*
+         * If user specifies a flow (like UDP flow) without L2 patterns,
+         * OVS will at least set the dl_type. Normally, it's enough to
+         * create an eth pattern just with it. Unluckily, some Intel's
+         * NIC (such as XL710) doesn't support that. Below is a workaround,
+         * which simply matches any L2 pkts.
+         */
+        add_flow_pattern(patterns, RTE_FLOW_ITEM_TYPE_VLAN, NULL, NULL);
     }
 
     /* VLAN */
-- 
2.7.4



More information about the dev mailing list