From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f67.google.com (mail-wm0-f67.google.com [74.125.82.67]) by dpdk.org (Postfix) with ESMTP id EA63910BD for ; Mon, 30 Apr 2018 16:54:49 +0200 (CEST) Received: by mail-wm0-f67.google.com with SMTP id j5so14732473wme.5 for ; Mon, 30 Apr 2018 07:54:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=SIsI/i7gVXNIi/ena4m4HeM/RuA48I7LohNCCIMlSx8=; b=mhtsO0FqsGZT0qyRX7aQrBv5nDy0s/jlKonBUX+IxChANhtpW4UFqoX3ZRDrT7LuEp 66XGZojKTpyu7Q+hCfHo708u7z8U1LiqLjih73h5x0I8SU+3XWPRCXUGVLhUx6MICFdc yJjUu/135ro9AtXPKo2iw1M4Ij8ZbXljvd94lu9Toy6A3dQ6ivwtdjJq3o/OsR/ltaoc rOSZh0yfV836unRH/jpTorPN/PsoiOKwg2cPM8p/YfLIrlMaruyX9W4kkrqD+DSs/B0U EDRZ6Hx6a4EXLLiGD3uAW2VB4KxYsfT+lPMPqw00hNkif9aFjwtL2zGMCkvybbWmIEz/ q0Fw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=SIsI/i7gVXNIi/ena4m4HeM/RuA48I7LohNCCIMlSx8=; b=BofbVTiYvVlvrDuAm9tL9d6x1UHL0MmBWNXVDKtfgnRgCCf0H72Qwgl1AYtR4Dd/38 tEQXykd+zcZoPigrh1uRpazZrcu+1kMLB4qkhNk2sVOd83dVKoFalBYavakfXfw/PTc1 ZTHkzFw6PKopQerwLqNAI0ISAHMDrrpxU8KIUcXFoUwRrizh8uuXF8T8L9VHHAvxYAQg odWUs2xNmsgaMyM40CPEQZkDlgKPv22tteU0LGTj7qneYFEByJJVgxOpf/INZOr5HLLd Lnmc3Y5xiR+5lfpCkHcuqyd6sEV0rw7GuH4E/sdtEhA6xr9FfLkSUdI7ZcwbhgPlZhBp bgOA== X-Gm-Message-State: ALQs6tCERUnMf+ZQutdESWq0NJRktR9X2g6ixVXLHm25uUnXyXoiGcDy txFOP21nyMzPs2VtAZIExdo= X-Google-Smtp-Source: AB8JxZpmTwSzh4mKZb0Ls0OHfoT5cwOS0pkPmygc2GHOaenRJb2gXhNlhaJk9axbOkReIUq3N/UCUQ== X-Received: by 10.28.7.207 with SMTP id 198mr5859701wmh.149.1525100089638; Mon, 30 Apr 2018 07:54:49 -0700 (PDT) Received: from localhost ([2a00:23c5:be9a:5200:ce4c:82c0:d567:ecbb]) by smtp.gmail.com with ESMTPSA id e131sm7820239wmg.1.2018.04.30.07.54.48 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 Apr 2018 07:54:48 -0700 (PDT) From: luca.boccassi@gmail.com To: Ajit Khaparde Cc: dpdk stable Date: Mon, 30 Apr 2018 15:53:48 +0100 Message-Id: <20180430145402.23057-29-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20180430145402.23057-1-luca.boccassi@gmail.com> References: <20180430144223.18657-85-luca.boccassi@gmail.com> <20180430145402.23057-1-luca.boccassi@gmail.com> Subject: [dpdk-stable] patch 'net/bnxt: avoid invalid vnic id in set L2 Rx mask' has been queued to stable release 18.02.2 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Apr 2018 14:54:50 -0000 Hi, FYI, your patch has been queued to stable release 18.02.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 05/02/18. So please shout if anyone has objections. Thanks. Luca Boccassi --- >>From 7f7375c438d00fedd699cb7157387838c4ca1a23 Mon Sep 17 00:00:00 2001 From: Ajit Khaparde Date: Fri, 20 Apr 2018 07:22:01 -0700 Subject: [PATCH] net/bnxt: avoid invalid vnic id in set L2 Rx mask [ upstream commit 1b533790f44ee160bae86bdcc5307d7b52225726 ] In some cases bnxt_hwrm_cfa_l2_set_rx_mask is being called before VNICs are allocated. The FW returns an error in such cases. Move bnxt_init_nic to bnxt_dev_init such that the ids are initialized to an invalid id. Prevent sending the command to the FW only with a valid vnic id. Fixes: 244bc98b0da7 ("net/bnxt: set L2 Rx mask") Signed-off-by: Ajit Khaparde --- drivers/net/bnxt/bnxt_ethdev.c | 7 ++----- drivers/net/bnxt/bnxt_hwrm.c | 3 +++ 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c index 14aaf05a8..de8824641 100644 --- a/drivers/net/bnxt/bnxt_ethdev.c +++ b/drivers/net/bnxt/bnxt_ethdev.c @@ -392,10 +392,6 @@ static int bnxt_init_nic(struct bnxt *bp) bnxt_init_vnics(bp); bnxt_init_filters(bp); - rc = bnxt_init_chip(bp); - if (rc) - return rc; - return 0; } @@ -585,7 +581,7 @@ static int bnxt_dev_start_op(struct rte_eth_dev *eth_dev) } bp->dev_stopped = 0; - rc = bnxt_init_nic(bp); + rc = bnxt_init_chip(bp); if (rc) goto error; @@ -3370,6 +3366,7 @@ skip_init: goto error_free_int; bnxt_enable_int(bp); + bnxt_init_nic(bp); return 0; diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c index 9c7b1f244..3f73a9001 100644 --- a/drivers/net/bnxt/bnxt_hwrm.c +++ b/drivers/net/bnxt/bnxt_hwrm.c @@ -248,6 +248,9 @@ int bnxt_hwrm_cfa_l2_set_rx_mask(struct bnxt *bp, struct hwrm_cfa_l2_set_rx_mask_output *resp = bp->hwrm_cmd_resp_addr; uint32_t mask = 0; + if (vnic->fw_vnic_id == INVALID_HW_RING_ID) + return rc; + HWRM_PREP(req, CFA_L2_SET_RX_MASK); req.vnic_id = rte_cpu_to_le_16(vnic->fw_vnic_id); -- 2.14.2