From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9A24C42ED5 for ; Fri, 21 Jul 2023 08:00:22 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9338540DF8; Fri, 21 Jul 2023 08:00:22 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id F347E40DD8; Fri, 21 Jul 2023 08:00:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1689919221; x=1721455221; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=4fBSQGW0/1hB+lvbYYvVt15h1dBiY6CzvDyLSBnakMk=; b=V8dZXC5GrZeOQwjv07o99zt7dtszTAjXZzxETlVDYLDxhm5lPU6Y/Hw+ NKghkH6G0XJ3pc0opE/y4cNtyWzZTVtqVkGdFfMkf8BSfjBzl/8QDxPR2 KnpT1ZQjlJ/2NhG13/L250r4TyNuRxS2+pEj9m3fLnI5T9XqVV8tYCyP/ 3/v7b3CasrPNlkdNfPA6Wo0REbgiBS1P61LU1aS6/yLdqPoxYsEHQuEw2 woMuUKEJmRGpdM005jY8spdzB/qPDnCKGa5p/RsoOJElOdA966IFMxerL PlcYOsV13theNtQZ3BTqbYZSb9GOOh5iSpGuYoL/ca5cYEvs5mCd09ZiP g==; X-IronPort-AV: E=McAfee;i="6600,9927,10777"; a="369615490" X-IronPort-AV: E=Sophos;i="6.01,220,1684825200"; d="scan'208";a="369615490" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Jul 2023 23:00:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10777"; a="971321009" X-IronPort-AV: E=Sophos;i="6.01,220,1684825200"; d="scan'208";a="971321009" Received: from dpdk-beileix-3.sh.intel.com ([10.67.110.253]) by fmsmga006.fm.intel.com with ESMTP; 20 Jul 2023 23:00:15 -0700 From: beilei.xing@intel.com To: jingjing.wu@intel.com, yuying.zhang@intel.com Cc: dev@dpdk.org, Beilei Xing , stable@dpdk.org Subject: [PATCH v2] net/i40e: fix FDIR Rxq receives broadcast packets Date: Fri, 21 Jul 2023 05:35:13 +0000 Message-Id: <20230721053513.57664-1-beilei.xing@intel.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20230721052919.57463-1-beilei.xing@intel.com> References: <20230721052919.57463-1-beilei.xing@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org From: Beilei Xing FDIR Rxq is excepted to only receive FDIR programming status, won't receive broadcast packets. Fixes: a778a1fa2e4e ("i40e: set up and initialize flow director") Cc: stable@dpdk.org Signed-off-by: Beilei Xing --- V2 change: - Fix typo in commit log. drivers/net/i40e/i40e_ethdev.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c index 8271bbb394..7b4f33a5cf 100644 --- a/drivers/net/i40e/i40e_ethdev.c +++ b/drivers/net/i40e/i40e_ethdev.c @@ -6025,14 +6025,16 @@ i40e_vsi_setup(struct i40e_pf *pf, } } - /* MAC/VLAN configuration */ - rte_memcpy(&filter.mac_addr, &broadcast, RTE_ETHER_ADDR_LEN); - filter.filter_type = I40E_MACVLAN_PERFECT_MATCH; + if (vsi->type != I40E_VSI_FDIR) { + /* MAC/VLAN configuration for non-FDIR VSI*/ + rte_memcpy(&filter.mac_addr, &broadcast, RTE_ETHER_ADDR_LEN); + filter.filter_type = I40E_MACVLAN_PERFECT_MATCH; - ret = i40e_vsi_add_mac(vsi, &filter); - if (ret != I40E_SUCCESS) { - PMD_DRV_LOG(ERR, "Failed to add MACVLAN filter"); - goto fail_msix_alloc; + ret = i40e_vsi_add_mac(vsi, &filter); + if (ret != I40E_SUCCESS) { + PMD_DRV_LOG(ERR, "Failed to add MACVLAN filter"); + goto fail_msix_alloc; + } } /* Get VSI BW information */ -- 2.26.2