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 11:39:21 +0200
commitc935d369c807d751627f0859d462d8a7a04d43af (patch)
tree249eb8a85b179489876425788fc67bbd8534fca8
parent21b32b2aa4a7a49192415b8a33b65008dafd9983 (diff)
downloadopenvswitch-c935d369c807d751627f0859d462d8a7a04d43af.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-dpdk.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c
index 9a91ddb5e..5a106e732 100644
--- a/lib/netdev-dpdk.c
+++ b/lib/netdev-dpdk.c
@@ -4417,9 +4417,18 @@ netdev_dpdk_add_rte_flow_offload(struct netdev *netdev,
struct rte_flow_item_eth eth_mask;
memset(&eth_spec, 0, sizeof(eth_spec));
memset(&eth_mask, 0, sizeof(eth_mask));
- 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);
+ } 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)) {
rte_memcpy(&eth_spec.dst, &match->flow.dl_dst, sizeof(eth_spec.dst));
rte_memcpy(&eth_spec.src, &match->flow.dl_src, sizeof(eth_spec.src));
eth_spec.type = match->flow.dl_type;