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 1FAF7A0032 for ; Fri, 18 Feb 2022 13:40:48 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 19E7C40395; Fri, 18 Feb 2022 13:40:48 +0100 (CET) Received: from mail-wr1-f46.google.com (mail-wr1-f46.google.com [209.85.221.46]) by mails.dpdk.org (Postfix) with ESMTP id 5903A4114F for ; Fri, 18 Feb 2022 13:40:47 +0100 (CET) Received: by mail-wr1-f46.google.com with SMTP id h6so14347132wrb.9 for ; Fri, 18 Feb 2022 04:40:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=YMQB7wBJSB/CpRHr1JwLTE01YVIWa2O/YOdr1nBVVaw=; b=AHGbsmM5PABJDG5taKfdN3pvNebq7YLcunVxCTtlPde3keM1HRgFrzP+Jw2XZOFcUo oeJMPqMVNTN+w8by6TOvhDy15co9FjYLXFgJ09cuj4Sqz+qsufr3aO3PEze9qDemKQH/ eBJmNnOqSgvjo870PPO8aaMB3XwQy0oT/3yrcnrkMz/yNXD1CBd13SLhhhSmFykCSI0B onznZ2KCAIBVC78PQsVL9MSxdRF33DLQLaOvbBTo7W4sbTQBoc9bKeC5PJAZXNlJH0kN m2TEmr3cUNaHdL91R/t1QEBdj74cbxk7LDonOZ0LlM1Rf24TPotJfy0BGT5GDqQPPU6W 2S+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=YMQB7wBJSB/CpRHr1JwLTE01YVIWa2O/YOdr1nBVVaw=; b=UDNIiNmuCgG08XE0L3Up6VOg9yD6ALi7JiOmlBTjqsl2J4XKp9wj/QshuwPF3GybNi aA2801e+LK2Mi/EkndJSL7lU3XozdMVTCnt1FVW98d1kgs+Y/OEstcj9cSBTzP41G9Mx 5OyoFTO1I5/K2ErfPdIMrxRAFlXN/girKCBUVB4/MlHdJCxrjZmR+ydn3jm7BN1HGMU7 jcm+XrZ/gkIhbqj7XiX2h9DtSxcp0levzhrVt2wpF5VVrZxEKrjHdIZKsXcd9XKfS5Kh LwfrLSLXgurGw81V7ofDkcGtsZUMtu2sXoU40BC3rOkHmCKJQ4/HhVRsdOp66j0tSNH+ 0OdA== X-Gm-Message-State: AOAM533tYyzbxVOsgfKG3LwqqbUHuWd6Uq9zfYropJnxK1smh31GgAJO qbPUCTS0jLhPL738CRkX/SMIq8R5aUN8WF7e X-Google-Smtp-Source: ABdhPJwctfjqjN40NcHImincKRg/2tVt1S11IeC1uIQVy7EaXtuhud1FtCJQleydI+KUGetnhqi7qw== X-Received: by 2002:adf:d20e:0:b0:1e4:a0a0:9da2 with SMTP id j14-20020adfd20e000000b001e4a0a09da2mr5874911wrh.319.1645188047113; Fri, 18 Feb 2022 04:40:47 -0800 (PST) Received: from localhost ([2a01:4b00:f41a:3600:360b:9754:2e3a:c344]) by smtp.gmail.com with ESMTPSA id r2sm6086726wmq.0.2022.02.18.04.40.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Feb 2022 04:40:46 -0800 (PST) From: luca.boccassi@gmail.com To: Kalesh AP Cc: Ajit Khaparde , Somnath Kotur , Lance Richardson , dpdk stable Subject: patch 'net/bnxt: fix queue stop operation' has been queued to stable release 20.11.5 Date: Fri, 18 Feb 2022 12:37:54 +0000 Message-Id: <20220218123931.1749595-25-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220218123931.1749595-1-luca.boccassi@gmail.com> References: <20220218123931.1749595-1-luca.boccassi@gmail.com> 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 Hi, FYI, your patch has been queued to stable release 20.11.5 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 02/20/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/c612a4bbf3a2dbf2283eefccda3596c704f8476e Thanks. Luca Boccassi --- >From c612a4bbf3a2dbf2283eefccda3596c704f8476e Mon Sep 17 00:00:00 2001 From: Kalesh AP Date: Tue, 4 Jan 2022 14:08:09 +0530 Subject: [PATCH] net/bnxt: fix queue stop operation [ upstream commit 3e6fae2b65aa778dba5059ec0bc92102f05adc54 ] When there are no active Rx queues(i.e when all queues have been stopped), clear the RSS redirection table of the VNIC on Thor. Fixes: 9b63c6fd70e3 ("net/bnxt: support Rx/Tx queue start/stop") Signed-off-by: Kalesh AP Reviewed-by: Ajit Khaparde Reviewed-by: Somnath Kotur Reviewed-by: Lance Richardson --- drivers/net/bnxt/bnxt_hwrm.c | 23 +++++++++++++++++++++++ drivers/net/bnxt/bnxt_hwrm.h | 1 + drivers/net/bnxt/bnxt_rxq.c | 3 +++ 3 files changed, 27 insertions(+) diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c index 6a3f710d2e..e6571e3ba7 100644 --- a/drivers/net/bnxt/bnxt_hwrm.c +++ b/drivers/net/bnxt/bnxt_hwrm.c @@ -5961,3 +5961,26 @@ int bnxt_hwrm_poll_ver_get(struct bnxt *bp) return rc; } + +int +bnxt_vnic_rss_clear_p5(struct bnxt *bp, struct bnxt_vnic_info *vnic) +{ + struct hwrm_vnic_rss_cfg_output *resp = bp->hwrm_cmd_resp_addr; + struct hwrm_vnic_rss_cfg_input req = {0}; + int nr_ctxs = vnic->num_lb_ctxts; + int i, rc = 0; + + for (i = 0; i < nr_ctxs; i++) { + HWRM_PREP(&req, HWRM_VNIC_RSS_CFG, BNXT_USE_CHIMP_MB); + + req.rss_ctx_idx = rte_cpu_to_le_16(vnic->fw_grp_ids[i]); + req.vnic_id = rte_cpu_to_le_16(vnic->fw_vnic_id); + + rc = bnxt_hwrm_send_message(bp, &req, sizeof(req), BNXT_USE_CHIMP_MB); + + HWRM_CHECK_RESULT(); + HWRM_UNLOCK(); + } + + return rc; +} diff --git a/drivers/net/bnxt/bnxt_hwrm.h b/drivers/net/bnxt/bnxt_hwrm.h index 934a2056b8..926f32df05 100644 --- a/drivers/net/bnxt/bnxt_hwrm.h +++ b/drivers/net/bnxt/bnxt_hwrm.h @@ -297,4 +297,5 @@ int bnxt_hwrm_poll_ver_get(struct bnxt *bp); int bnxt_hwrm_ring_stats(struct bnxt *bp, uint32_t cid, int idx, struct bnxt_ring_stats *stats, bool rx); int bnxt_hwrm_rx_ring_reset(struct bnxt *bp, int queue_index); +int bnxt_vnic_rss_clear_p5(struct bnxt *bp, struct bnxt_vnic_info *vnic); #endif diff --git a/drivers/net/bnxt/bnxt_rxq.c b/drivers/net/bnxt/bnxt_rxq.c index a2feb525c4..aa73bd25e1 100644 --- a/drivers/net/bnxt/bnxt_rxq.c +++ b/drivers/net/bnxt/bnxt_rxq.c @@ -546,6 +546,9 @@ int bnxt_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id) if (active_queue_cnt == 0) { uint16_t saved_mru = vnic->mru; + /* clear RSS setting on vnic. */ + bnxt_vnic_rss_clear_p5(bp, vnic); + vnic->mru = 0; /* Reconfigure default receive ring and MRU. */ bnxt_hwrm_vnic_cfg(bp, vnic); -- 2.30.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-02-18 12:37:39.119172284 +0000 +++ 0025-net-bnxt-fix-queue-stop-operation.patch 2022-02-18 12:37:37.582789508 +0000 @@ -1 +1 @@ -From 3e6fae2b65aa778dba5059ec0bc92102f05adc54 Mon Sep 17 00:00:00 2001 +From c612a4bbf3a2dbf2283eefccda3596c704f8476e Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 3e6fae2b65aa778dba5059ec0bc92102f05adc54 ] + @@ -10 +11,0 @@ -Cc: stable@dpdk.org @@ -23 +24 @@ -index 568f77a87e..6093407986 100644 +index 6a3f710d2e..e6571e3ba7 100644 @@ -26 +27 @@ -@@ -6262,3 +6262,26 @@ int bnxt_hwrm_config_host_mtu(struct bnxt *bp) +@@ -5961,3 +5961,26 @@ int bnxt_hwrm_poll_ver_get(struct bnxt *bp) @@ -54 +55 @@ -index f8f0556201..8202455bf0 100644 +index 934a2056b8..926f32df05 100644 @@ -57,4 +58,4 @@ -@@ -310,4 +310,5 @@ int bnxt_hwrm_stat_ctx_alloc(struct bnxt *bp, struct bnxt_cp_ring_info *cpr); - void bnxt_free_hwrm_tx_ring(struct bnxt *bp, int queue_index); - int bnxt_alloc_hwrm_tx_ring(struct bnxt *bp, int queue_index); - int bnxt_hwrm_config_host_mtu(struct bnxt *bp); +@@ -297,4 +297,5 @@ int bnxt_hwrm_poll_ver_get(struct bnxt *bp); + int bnxt_hwrm_ring_stats(struct bnxt *bp, uint32_t cid, int idx, + struct bnxt_ring_stats *stats, bool rx); + int bnxt_hwrm_rx_ring_reset(struct bnxt *bp, int queue_index); @@ -64 +65 @@ -index 1456f8b54f..c9d99039ad 100644 +index a2feb525c4..aa73bd25e1 100644 @@ -67 +68 @@ -@@ -574,6 +574,9 @@ int bnxt_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id) +@@ -546,6 +546,9 @@ int bnxt_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id)