[ovs-dev] [PATCH V4 04/12] netdev-offload-dpdk: Fix Ethernet matching for type only
Eli Britstein
elibr at mellanox.com
Wed Jul 1 05:34:53 UTC 2020
For OVS rule of the form "eth type is 0x1234 / end", rule is offloaded
in the form of "eth / end", which is incorrect. Fix it.
Fixes: e8a2b5bf92bb ("netdev-dpdk: implement flow offload with rte flow")
Signed-off-by: Eli Britstein <elibr at mellanox.com>
Reviewed-by: Roni Bar Yanai <roniba at mellanox.com>
Acked-by: Sriharsha Basavapatna <sriharsha.basavapatna at broadcom.com>
---
lib/netdev-offload-dpdk.c | 12 ++----------
1 file changed, 2 insertions(+), 10 deletions(-)
diff --git a/lib/netdev-offload-dpdk.c b/lib/netdev-offload-dpdk.c
index abe374e0b..613e7e3ea 100644
--- a/lib/netdev-offload-dpdk.c
+++ b/lib/netdev-offload-dpdk.c
@@ -550,7 +550,8 @@ parse_flow_match(struct flow_patterns *patterns,
uint8_t proto = 0;
/* Eth */
- if (!eth_addr_is_zero(match->wc.masks.dl_src) ||
+ 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;
@@ -566,15 +567,6 @@ 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_ETH, NULL, NULL);
}
/* VLAN */
--
2.14.5
More information about the dev
mailing list