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 60DC842ED5 for ; Fri, 21 Jul 2023 07:54:30 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5601C427F5; Fri, 21 Jul 2023 07:54:30 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id 2DF7440DD8; Fri, 21 Jul 2023 07:54:27 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1689918867; x=1721454867; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=JBNhssAcrX3LQPRTYKEpxL+/Ju7iG5ctixVpp31CP8c=; b=Ij/3BAWS/QQS+PXJnlfBnaUZOiHD2X+PTC+vjgxsIOo0NL0zB2z2Gesn 7ICe3Y1eVUesD/gi0uhUyYE641BWhl6ZnOy4BCCdOKG5gQIt4BKXVZq5V E0zUVlhoOjDmxnDnlfsM/69VS0ETahAhk/TiTBTjY7dPIs8wNsDr33+ev 299DC6Ku8ikVwONti5PjPy6pdRolE+tAZOri6xOEVeoCbAsHL1lbPeT7L a1VbtfFVWAWt3PAlUhWqnGTwlmKq4CZ5vGMrdq9frYqbUyrMh8d0FdCqa Nshf3iKUo6AJlXxkjJP5rwj1LuFSe5uYcSZlL8HsjKQozY1yC5OOk1atb w==; X-IronPort-AV: E=McAfee;i="6600,9927,10777"; a="370544193" X-IronPort-AV: E=Sophos;i="6.01,220,1684825200"; d="scan'208";a="370544193" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Jul 2023 22:54:26 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10777"; a="754326215" X-IronPort-AV: E=Sophos;i="6.01,220,1684825200"; d="scan'208";a="754326215" Received: from dpdk-beileix-3.sh.intel.com ([10.67.110.253]) by orsmga008.jf.intel.com with ESMTP; 20 Jul 2023 22:54:24 -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] net/i40e: fix FDIR Rxq receives broadcast packets Date: Fri, 21 Jul 2023 05:29:19 +0000 Message-Id: <20230721052919.57463-1-beilei.xing@intel.com> X-Mailer: git-send-email 2.26.2 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 reveive 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 --- 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 cb0070f94b..0ff334745d 100644 --- a/drivers/net/i40e/i40e_ethdev.c +++ b/drivers/net/i40e/i40e_ethdev.c @@ -6006,14 +6006,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