[ovs-dev] [PATCH V2 2/2] netdev-offload-dpdk: Fix ethernet type for VLANs
Eli Britstein
elibr at nvidia.com
Mon Mar 15 08:31:36 UTC 2021
For VLANs, the match of ethernet type should be specified in inner_type
field of the vlan match, and not type field in ethernet match.
Fix it.
Fixes: e8a2b5bf92bb ("netdev-dpdk: implement flow offload with rte flow")
Signed-off-by: Eli Britstein <elibr at nvidia.com>
Reviewed-by: Salem Sol <salems at nvidia.com>
---
lib/netdev-offload-dpdk.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/lib/netdev-offload-dpdk.c b/lib/netdev-offload-dpdk.c
index efcae08d2..f646c7170 100644
--- a/lib/netdev-offload-dpdk.c
+++ b/lib/netdev-offload-dpdk.c
@@ -738,12 +738,13 @@ parse_flow_match(struct flow_patterns *patterns,
spec->tci = match->flow.vlans[0].tci & ~htons(VLAN_CFI);
mask->tci = match->wc.masks.vlans[0].tci & ~htons(VLAN_CFI);
- /* Match any protocols. */
- mask->inner_type = 0;
-
if (eth_spec && eth_mask) {
eth_spec->has_vlan = 1;
eth_mask->has_vlan = 1;
+ spec->inner_type = eth_spec->type;
+ mask->inner_type = eth_mask->type;
+ eth_spec->type = match->flow.vlans[0].tpid;
+ eth_mask->type = match->wc.masks.vlans[0].tpid;
}
add_flow_pattern(patterns, RTE_FLOW_ITEM_TYPE_VLAN, spec, mask);
--
2.28.0.2311.g225365fb51
More information about the dev
mailing list