From: Shougang Wang Date: Wed, 13 May 2020 02:54:50 +0000 (+0000) Subject: net/i40e: fix flow director MAC rule creation X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=103e2c02260cc072f73c93d667a66864e330919d;p=dpdk.git net/i40e: fix flow director MAC rule creation 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 Tested-by: Hailin Xu Reviewed-by: Jeff Guo --- diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c index 65f877866d..8ce21f7b66 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(ð_mask->src) || + !rte_is_zero_ether_addr(ð_mask->dst)) { rte_flow_error_set(error, EINVAL, RTE_FLOW_ERROR_TYPE_ITEM, item,