]> git.droids-corp.org - dpdk.git/commitdiff
net/i40e: fix QinQ flow pattern to allow non full mask
authorPadraig Connolly <padraig.j.connolly@intel.com>
Thu, 15 Oct 2020 09:28:58 +0000 (10:28 +0100)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 3 Nov 2020 22:24:26 +0000 (23:24 +0100)
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 equal
I40E_TCI_MASK (full mask 0xffff).

Fixes: d37705068ee8 ("net/i40e: parse QinQ pattern")
Cc: stable@dpdk.org
Signed-off-by: Padraig Connolly <padraig.j.connolly@intel.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
drivers/net/i40e/i40e_flow.c

index adc5da1c532a20557af9adf820505efb89eb8d79..8e7a9989b35f269a6f826f8f1404389585dddddd 100644 (file)
@@ -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,