From patchwork Wed May 6 06:14:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shougang Wang X-Patchwork-Id: 69801 X-Patchwork-Delegate: xiaolong.ye@intel.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id AC1B0A0353; Wed, 6 May 2020 08:19:55 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3FE561D6DF; Wed, 6 May 2020 08:19:55 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id 14C311D6DB for ; Wed, 6 May 2020 08:19:52 +0200 (CEST) IronPort-SDR: 7NUAExta170DJkkXOV2YGGS/VgLtt9px+5WHtSypJXrU1Pm6DVssEpfr4QYPNF90HOq6ZNZm1u S5B2+tyanZAQ== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 May 2020 23:19:51 -0700 IronPort-SDR: /vD9qbTkH+rjUmGEEWnj4tBLaw4JRCZ5ygEF+o/W74x9PrrP/QdNYCPlM7rWAsNSYKPo8o0WeC X7VAeXOXPUdA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,358,1583222400"; d="scan'208";a="369692871" Received: from unknown (HELO intel.sh.intel.com) ([10.239.255.64]) by fmsmga001.fm.intel.com with ESMTP; 05 May 2020 23:19:49 -0700 From: Shougang Wang To: dev@dpdk.org Cc: Beilei Xing , Qiming Yang , Shougang Wang Date: Wed, 6 May 2020 06:14:55 +0000 Message-Id: <20200506061455.102358-1-shougangx.wang@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dpdk-dev] [PATCH] net/i40e: fix failing to create FDIR flow X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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: Xu, Hailin Signed-off-by: Shougang Wang --- 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(ð_mask->src) || + !rte_is_zero_ether_addr(ð_mask->dst)) { rte_flow_error_set(error, EINVAL, RTE_FLOW_ERROR_TYPE_ITEM, item,