[dpdk-dev] [PATCH] net/i40e: fix failing to create FDIR flow

Xu, HailinX hailinx.xu at intel.com
Wed May 6 10:55:54 CEST 2020


Tested-by: Xu, Hailin <hailinx.xu at intel.com>

Regards,
Xu, Hailin


-----Original Message-----
From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Shougang Wang
Sent: Wednesday, May 6, 2020 2:15 PM
To: dev at dpdk.org
Cc: Xing, Beilei <beilei.xing at intel.com>; Yang, Qiming <qiming.yang at intel.com>; Wang, ShougangX <shougangx.wang at intel.com>
Subject: [dpdk-dev] [PATCH] net/i40e: fix failing to create FDIR flow

This patch fixes the issue that the flow which both source MAC mask and destination MAC mask are all zeros can not be created.

Fixes: ea0c22fd8227 ("net/i40e: enable MAC address as flow director input set")

Signed-off-by: Shougang Wang <shougangx.wang at 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 7e64ae53a..fa6ab4fbf 100644
--- a/drivers/net/i40e/i40e_flow.c
+++ b/drivers/net/i40e/i40e_flow.c
@@ -2643,7 +2643,8 @@ i40e_flow_parse_fdir_pattern(struct rte_eth_dev *dev,
 					filter->input.flow.l2_flow.src =
 						eth_spec->src;
 					input_set |= (I40E_INSET_DMAC | I40E_INSET_SMAC);
-				} else {
+				} else if (!rte_is_zero_ether_addr(&eth_mask->src) ||
+					!rte_is_zero_ether_addr(&eth_mask->dst)) {
 					rte_flow_error_set(error, EINVAL,
 						      RTE_FLOW_ERROR_TYPE_ITEM,
 						      item,
--
2.17.1



More information about the dev mailing list