From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7C7FFA32A1 for ; Thu, 24 Oct 2019 08:08:02 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9F4B11C1FC; Thu, 24 Oct 2019 08:07:21 +0200 (CEST) Received: from relay.smtp.broadcom.com (relay.smtp.broadcom.com [192.19.211.62]) by dpdk.org (Postfix) with ESMTP id 562951C190 for ; Thu, 24 Oct 2019 08:06:59 +0200 (CEST) Received: from dhcp-10-123-153-55.dhcp.broadcom.net (bgccx-dev-host-lnx35.bec.broadcom.net [10.123.153.55]) by relay.smtp.broadcom.com (Postfix) with ESMTP id 3A0FD28FA85; Wed, 23 Oct 2019 23:06:58 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.10.3 relay.smtp.broadcom.com 3A0FD28FA85 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1571897218; bh=q891UosWyEh8Nygxq2YmT+Ce9Ji3N4FpAGxPcWq+zjo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uiJRBFl+ikFcoV57r4TcJmNcQpNlqj+o0a0R7j9fge/TwU+wa7DsVvlTwWIV3pa92 vQLqtNrmRd1DxwnFiiPI4OqPLXWbB5oSnEshkPa5XLyzgb1Apd7yb6KZ0hruxEdsCs p1PmrG+lNzOboWID/b04v2Q7StKzddYQ01tDH1MY= From: Somnath Kotur To: dev@dpdk.org Cc: ferruh.yigit@intel.com Date: Thu, 24 Oct 2019 11:29:02 +0530 Message-Id: <20191024055913.28817-8-somnath.kotur@broadcom.com> X-Mailer: git-send-email 2.10.1.613.g2cc2e70 In-Reply-To: <20191024055913.28817-1-somnath.kotur@broadcom.com> References: <20191024055913.28817-1-somnath.kotur@broadcom.com> Subject: [dpdk-dev] [PATCH 07/16] net/bnxt: use mac index, while checking for default mac 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" From: Venkat Duvvuru bnxt_set_hwrm_vnic_filters programs default mac addr and the same default mac is added by mac_add_addr_op routine as well. This redundant mac add is avoided by checking if the default mac is already added. However, that check is wrong. The check should consider the mac index as well to determine the default mac. This patch fixes it by using mac index to determine the default mac. Fixes: d42878f5fa17 ("net/bnxt: fix vlan filtering code path") Signed-off-by: Venkat Duvvuru Reviewed-by: Somnath Kotur Signed-off-by: Somnath Kotur --- drivers/net/bnxt/bnxt_ethdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c index ce3a03a..820005c 100644 --- a/drivers/net/bnxt/bnxt_ethdev.c +++ b/drivers/net/bnxt/bnxt_ethdev.c @@ -1023,7 +1023,7 @@ static int bnxt_add_mac_filter(struct bnxt *bp, struct bnxt_vnic_info *vnic, * hw-vlan-filter is turned OFF from ON, default * MAC filter should be restored */ - if (filter->dflt) + if (index == 0 && filter->dflt) return 0; filter = bnxt_alloc_filter(bp); -- 1.8.3.1