summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmma Finn <emma.finn@intel.com>2020-08-14 14:38:49 +0100
committerIlya Maximets <i.maximets@ovn.org>2020-08-17 14:16:00 +0200
commit023f257852f6b26da6b3362e507a1a9df2a30c44 (patch)
tree2d0865802bf60ebfae75408a8576b5e9437efcc8
parentd08a602b351faed7d62edcdf988c450366931feb (diff)
downloadopenvswitch-023f257852f6b26da6b3362e507a1a9df2a30c44.tar.gz
netdev-offload-dpdk: Fix for broken ethernet matching HWOL for XL710NIC.
This patch introduces a temporary work around to fix partial hardware offload for XL710 devices. Currently the incorrect ethernet pattern is being set. This patch will be removed once this issue is fixed within the i40e PMD. Signed-off-by: Emma Finn <emma.finn@intel.com> Signed-off-by: Eli Britstein <elibr@nvidia.com> Co-authored-by: Eli Britstein <elibr@nvidia.com> Tested-by: Ian Stokes <ian.stokes@intel.com> Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
-rw-r--r--lib/netdev-offload-dpdk.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/lib/netdev-offload-dpdk.c b/lib/netdev-offload-dpdk.c
index de6101e4d..5b632bac4 100644
--- a/lib/netdev-offload-dpdk.c
+++ b/lib/netdev-offload-dpdk.c
@@ -691,9 +691,22 @@ parse_flow_match(struct flow_patterns *patterns,
consumed_masks->packet_type = 0;
/* Eth */
- if (match->wc.masks.dl_type ||
- !eth_addr_is_zero(match->wc.masks.dl_src) ||
- !eth_addr_is_zero(match->wc.masks.dl_dst)) {
+ if (match->wc.masks.dl_type == OVS_BE16_MAX && is_ip_any(&match->flow)
+ && eth_addr_is_zero(match->wc.masks.dl_dst)
+ && eth_addr_is_zero(match->wc.masks.dl_src)) {
+ /*
+ * This is a temporary work around to fix ethernet pattern for partial
+ * hardware offload for X710 devices. This fix will be reverted once
+ * the issue is fixed within the i40e PMD driver.
+ */
+ add_flow_pattern(patterns, RTE_FLOW_ITEM_TYPE_ETH, NULL, NULL);
+
+ memset(&consumed_masks->dl_dst, 0, sizeof consumed_masks->dl_dst);
+ memset(&consumed_masks->dl_src, 0, sizeof consumed_masks->dl_src);
+ consumed_masks->dl_type = 0;
+ } else if (match->wc.masks.dl_type ||
+ !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;
spec = xzalloc(sizeof *spec);