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 AE140A00C5; Tue, 4 Jan 2022 09:19:40 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0E41E4115E; Tue, 4 Jan 2022 09:19:19 +0100 (CET) Received: from relay.smtp-ext.broadcom.com (relay.smtp-ext.broadcom.com [192.19.166.231]) by mails.dpdk.org (Postfix) with ESMTP id 79DF94115B for ; Tue, 4 Jan 2022 09:19:18 +0100 (CET) Received: from dhcp-10-123-153-22.dhcp.broadcom.net (bgccx-dev-host-lnx2.bec.broadcom.net [10.123.153.22]) by relay.smtp-ext.broadcom.com (Postfix) with ESMTP id BB4CEC0000F2; Tue, 4 Jan 2022 00:19:16 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 relay.smtp-ext.broadcom.com BB4CEC0000F2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1641284357; bh=l9pahSl6qtEdOUV4NEbSH+zVzRFBkbV9eI4oVbJtbnM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ilg3rGyaY5lnaMSbZ6g4hTi1JGn3WNjZDj85Jsf/Y909S8OOVB2KjIaNwXU1Cohfn Xww7DPfx5Yg8BVLqYidN0AUthOv/ohpmQswcf0AbGlsuUAXinh3mUSHG30roOc4HTM RejNN6hPxlZShzMdVmxKixrLRb/M0fu8pgdQW8LA= From: Kalesh A P To: dev@dpdk.org Cc: ferruh.yigit@intel.com, ajit.khaparde@broadcom.com Subject: [dpdk-dev] [PATCH 05/18] net/bnxt: fix restoring VLAN filtering after recovery Date: Tue, 4 Jan 2022 14:08:11 +0530 Message-Id: <20220104083824.23001-6-kalesh-anakkur.purayil@broadcom.com> X-Mailer: git-send-email 2.10.1 In-Reply-To: <20220104083824.23001-1-kalesh-anakkur.purayil@broadcom.com> References: <20220104083824.23001-1-kalesh-anakkur.purayil@broadcom.com> X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org From: Kalesh AP During port start, driver calls bnxt_vlan_offload_set_op() to program VLAN Filter/VLAN Strip setting to the HW. This in turns add the vlan filters. This results in a failure when bnxt_restore_filters() invokes bnxt_restore_vlan_filters() during the recovery as the vlans are already programmed. Fix to ignore the error(-EEXIST). Fixes: 151c8240ac6a ("net/bnxt: restore VLAN filters during reset recovery") Cc: stable@dpdk.org Signed-off-by: Kalesh AP Reviewed-by: Ajit Khaparde Reviewed-by: Somnath Kotur --- drivers/net/bnxt/bnxt_ethdev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c index dcf2839..99a7d35 100644 --- a/drivers/net/bnxt/bnxt_ethdev.c +++ b/drivers/net/bnxt/bnxt_ethdev.c @@ -4308,8 +4308,9 @@ static int bnxt_restore_filters(struct bnxt *bp) if (ret) return ret; + /* if vlans are already programmed, this can fail with -EEXIST */ ret = bnxt_restore_vlan_filters(bp); - if (ret) + if (ret && ret != -EEXIST) return ret; ret = bnxt_restore_mcast_mac_filters(bp); -- 2.10.1