Handle the following eth patterns:
eth dst spec aa:bb:cc:dd:ee:ff
eth dst mask ff:ff:ff:ff:ff:ff
eth src spec aa:bb:cc:dd:ee:ff
eth src mask ff:ff:ff:ff:ff:ff

Fixes: d46e85af6b5c ("net/i40e: parse QinQ pattern")

Signed-off-by: Bernard Iremonger <bernard.iremon...@intel.com>
---
 drivers/net/i40e/i40e_flow.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c
index 9f541eaff..3fcd31036 100644
--- a/drivers/net/i40e/i40e_flow.c
+++ b/drivers/net/i40e/i40e_flow.c
@@ -1772,7 +1772,8 @@ i40e_flow_parse_qinq_pattern(__rte_unused struct 
rte_eth_dev *dev,
                case RTE_FLOW_ITEM_TYPE_ETH:
                        eth_spec = (const struct rte_flow_item_eth *)item->spec;
                        eth_mask = (const struct rte_flow_item_eth *)item->mask;
-                       if (eth_spec && eth_mask) {
+                       if ((eth_spec && eth_mask) ||
+                           (eth_spec || eth_mask)) {
                                rte_flow_error_set(error, EINVAL,
                                                   RTE_FLOW_ERROR_TYPE_ITEM,
                                                   item,
-- 
2.11.0

Reply via email to