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 213EEA0588; Tue, 21 Apr 2020 10:57:45 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 509701D951; Tue, 21 Apr 2020 10:57:02 +0200 (CEST) Received: from relay.smtp.broadcom.com (unknown [192.19.232.149]) by dpdk.org (Postfix) with ESMTP id 51A091D941 for ; Tue, 21 Apr 2020 10:56:56 +0200 (CEST) Received: from dhcp-10-123-153-22.dhcp.broadcom.net (bgccx-dev-host-lnx2.bec.broadcom.net [10.123.153.22]) by relay.smtp.broadcom.com (Postfix) with ESMTP id ABB941BC910; Tue, 21 Apr 2020 01:56:55 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.10.3 relay.smtp.broadcom.com ABB941BC910 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1587459416; bh=JYuKBC9ie8b4PCKiM2H5VyMGqTdte2cJISxM+GwoeFk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=U7v27xmAB9zg7T4gf6eYLVm9URkkgoDyDFnzsY3zXUZUnxQZ6YwETdPBCqdAqk+j+ JfLd3mAltps8BmWDvcTPq7NQD8dPMOf+3QqjCGkntvs3xLsu5JNv1CEKX584/CDr28 CT2DX5tWHSIAubI2sYKjjRLs5FPRQpbDeBd1q0I8= From: Kalesh A P To: dev@dpdk.org Cc: ferruh.yigit@intel.com, ajit.khaparde@broadcom.com Date: Tue, 21 Apr 2020 14:42:54 +0530 Message-Id: <20200421091257.8089-7-kalesh-anakkur.purayil@broadcom.com> X-Mailer: git-send-email 2.10.1 In-Reply-To: <20200421091257.8089-1-kalesh-anakkur.purayil@broadcom.com> References: <20200421091257.8089-1-kalesh-anakkur.purayil@broadcom.com> Subject: [dpdk-dev] [PATCH 6/9] net/bnxt: fix vlan add when port is stopped 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: Kalesh AP Driver destroys the vnic when the port is brought down. When user tries to add a vlan when port is stopped, driver issues HWRM command to FW with invalid vnic_id and it fails. Fixed to return an error while setting vlan when port is not started. Fixes: b4e190d55c25 ("net/bnxt: fix MAC/VLAN filter allocation") Signed-off-by: Kalesh AP Reviewed-by: Venkat Duvvuru --- drivers/net/bnxt/bnxt_ethdev.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c index 206111d..589190b 100644 --- a/drivers/net/bnxt/bnxt_ethdev.c +++ b/drivers/net/bnxt/bnxt_ethdev.c @@ -2082,6 +2082,11 @@ static int bnxt_vlan_filter_set_op(struct rte_eth_dev *eth_dev, if (rc) return rc; + if (!eth_dev->data->dev_started) { + PMD_DRV_LOG(ERR, "port must be started before setting vlan\n"); + return -EINVAL; + } + /* These operations apply to ALL existing MAC/VLAN filters */ if (on) return bnxt_add_vlan_filter(bp, vlan_id); -- 2.10.1