net/i40e: fix qinq flow pattern to allow non full mask
A message that is not in the archive (sent off-list or not yet received): 20201013135756.23193-1
PATCH v2 1/1 net/i40e: fix qinq flow pattern to allow non full mask
Issue reported by customer that only full mask was allowed on inner and outer VLAN tag, thus not allowing mask to set VLAN ID filter only. Removed check that enforces inner vlan and outer vlan to equal I40E_TCI_MASK (full mask 0xffff).
--- drivers/net/i40e/i40e_flow.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-)
drivers/net/i40e/i40e_flow.c +3 -8
@@ -4649,14 +4649,9 @@ i40e_flow_parse_qinq_pattern(__rte_unused struct rte_eth_dev *dev, }/* Get filter specification */ -if ((o_vlan_mask !=NULL ) && (o_vlan_mask->tci == -rte_cpu_to_be_16 (I40E_TCI_MASK )) && - (i_vlan_mask !=NULL ) && - (i_vlan_mask->tci ==rte_cpu_to_be_16 (I40E_TCI_MASK ))) { - filter->outer_vlan =rte_be_to_cpu_16 (o_vlan_spec->tci) - &I40E_TCI_MASK ; - filter->inner_vlan =rte_be_to_cpu_16 (i_vlan_spec->tci) - &I40E_TCI_MASK ; +if (o_vlan_mask !=NULL && i_vlan_mask !=NULL ) { + filter->outer_vlan =rte_be_to_cpu_16 (o_vlan_spec->tci); + filter->inner_vlan =rte_be_to_cpu_16 (i_vlan_spec->tci); }else { rte_flow_error_set(error, EINVAL, RTE_FLOW_ERROR_TYPE_ITEM,
Signature · 13 lines
2.17.1 -------------------------------------------------------------- Intel Research and Development Ireland Limited Registered in Ireland Registered Office: Collinstown Industrial Park, Leixlip, County Kildare Registered Number: 308263 This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.
Hi Padraig,
Quoted 50 lines
-----Original Message-----
From: Connolly, Padraig J <[email protected]>
Sent: Wednesday, October 14, 2020 5:31 PM
To: Xing, Beilei <[email protected]>
Cc: [email protected]; Connolly, Padraig J <[email protected]>; Iremonger, Bernard <[email protected]>; [email protected]
Subject: [PATCH v2] net/i40e: fix qinq flow pattern to allow non full maskIssue reported by customer that only full mask was allowed on inner and outer VLAN tag, thus not allowing mask to set VLAN ID filter only. Removed check that enforces inner vlan and outer vlan to equal
I40E_TCI_MASK(full mask0xffff).Fixes c2be7f9b232f ("net/i40e: fix parsing QinQ pattern")Fixes d37705068ee8 ("net/i40e: parse QinQ pattern")Tested-by Padraig Connolly <[email protected]>Signed-off-by Padraig Connolly <[email protected]>--- drivers/net/i40e/i40e_flow.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-)drivers/net/i40e/i40e_flow.c +3
-8@@ -4649,14 +4649,9 @@ i40e_flow_parse_qinq_pattern(__rte_unusedstruct rte_eth_dev *dev, }/* Get filter specification */ -if ((o_vlan_mask !=NULL ) && (o_vlan_mask->tci == -rte_cpu_to_be_16 (I40E_TCI_MASK )) && - (i_vlan_mask !=NULL ) && - (i_vlan_mask->tci == rte_cpu_to_be_16(I40E_TCI_MASK))) { - filter->outer_vlan =rte_be_to_cpu_16 (o_vlan_spec->tci) - &I40E_TCI_MASK ; - filter->inner_vlan =rte_be_to_cpu_16 (i_vlan_spec->tci) - &I40E_TCI_MASK ; + if (o_vlan_mask != NULL && i_vlan_mask != NULL) { + filter->outer_vlan = rte_be_to_cpu_16(o_vlan_spec->tci); + filter->inner_vlan =rte_be_to_cpu_16 (i_vlan_spec->tci); }else {drivers/net/i40e/i40e_flow.c +0
-1rte_flow_error_set(error, EINVAL, RTE_FLOW_ERROR_TYPE_ITEM, --
Quoted 1 line
2.17.1
The following fixes line can be removed:
As the fix in the above patch is not changed by this fix.
Otherwise