2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-30 22:05:19 +00:00

netdev-offload-dpdk: Fix ethernet type for VLANs.

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: e8a2b5bf92 ("netdev-dpdk: implement flow offload with rte flow")
Signed-off-by: Eli Britstein <elibr@nvidia.com>
Reviewed-by: Salem Sol <salems@nvidia.com>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
This commit is contained in:
Eli Britstein
2022-02-07 18:56:45 +02:00
committed by Ilya Maximets
parent 9b7ed5f6f2
commit dc80822761

View File

@@ -1438,12 +1438,13 @@ parse_flow_match(struct netdev *netdev,
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, NULL);