From patchwork Wed May 13 02:54:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shougang Wang X-Patchwork-Id: 70139 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 51D60A034F; Wed, 13 May 2020 04:57:47 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 11D531C138; Wed, 13 May 2020 04:57:46 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 68BF51BFF2 for ; Wed, 13 May 2020 04:57:44 +0200 (CEST) IronPort-SDR: Kqga43447eaDdT9edIuWgGWpy8f2WoSpxwg4FjGk0kTHFhFJhNldMp1aVBzNKm2S/SYeI2TIvK DerIcPH4Xv+g== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 May 2020 19:57:42 -0700 IronPort-SDR: 3sIJgcbvs87iIKGYyH7Bw6g9OZN5WMQ4uU1yC2WjSZSquFNEE4bdRKNv3prvkK+e9CIZQdB2m8 Lhm3BPMtLuoQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,385,1583222400"; d="scan'208";a="371766617" Received: from intel.sh.intel.com ([10.239.255.64]) by fmsmga001.fm.intel.com with ESMTP; 12 May 2020 19:57:41 -0700 From: Shougang Wang To: dev@dpdk.org Cc: Beilei Xing , Qiming Yang , Shougang Wang Date: Wed, 13 May 2020 02:54:50 +0000 Message-Id: <20200513025450.66909-1-shougangx.wang@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200506061455.102358-1-shougangx.wang@intel.com> References: <20200506061455.102358-1-shougangx.wang@intel.com> Subject: [dpdk-dev] [PATCH v2] 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: Hailin Xu Reviewed-by: Jeff Guo --- v2 change: - Change code alignment format --- 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 65f877866..8ce21f7b6 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,