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 E5CD5A051C for ; Tue, 11 Feb 2020 12:39:16 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DE404137D; Tue, 11 Feb 2020 12:39:16 +0100 (CET) Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by dpdk.org (Postfix) with ESMTP id E1281137D for ; Tue, 11 Feb 2020 12:39:15 +0100 (CET) Received: by mail-wr1-f66.google.com with SMTP id z7so11886873wrl.13 for ; Tue, 11 Feb 2020 03:39:15 -0800 (PST) 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 :mime-version:content-transfer-encoding; bh=eMDbX8SegyzVVgx2cCgQ5Dzjf5VU9bmo1txcQF977Rs=; b=cttFBS4UKVSkkjSe+uLmYM/vEdm298GQWoIXdMKWru7pyufxFkaF9m6Z7FRktaJS81 4E+DqVIoJq2U1UpKhmi4WNeAsjb5oekOWFf4EBRJtMZfmBzFj8uw3mhQlEqSg4UJ/OjD 95hKon5aoKa841rCokIVo6PFbU4fY6xVYtso26C2HkF7/kStjpKJeYApwFbLrWEfXSIn nUc6p64lM1nMMaedQxWqFqmGMqoZRazDTki+YHGMkL3qJE7WqaUJXSjJGvFpYfNi1mIm Q387B7h/AaO6Che9FsdzDiSo4qsX3kRNKgfyn7K7alXYW++3bpQ+L7t6b7jxdSt0w3Si w9Ww== 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:mime-version:content-transfer-encoding; bh=eMDbX8SegyzVVgx2cCgQ5Dzjf5VU9bmo1txcQF977Rs=; b=ICOhy1bOskNMvko74CCng/2rAwRvdkNGPwHbgxSXbhL7CHEdJ+/kUAlmqKhEgfLwqC dl3YcgLHJSOn1vOhWL/OoBc56XbbslwfQ+QgaMa6r9xbb5hrYo77VquFHQPZJDmALMei Wz/WAcMbbV5mExbHsD51cbOOEq1uX3zBTWQ7j5X0CG88glRDxZld0TTs3ACcwrF96QGA J/0sJm/0g/KJaZakpjB5CbSjPSSt6IC6P4GmFKmkQmvOAqOFTpiUIZytUtaQFQf+kRc/ 37XZS7fJeLWgKReKdxOwj4DpQbbarjRauDAKzq/rm2WDobWmh6Bi3kESV0LKWpiUUeuZ osNQ== X-Gm-Message-State: APjAAAUk4ztUvAHkyOWXDZuTYMJku6UJJ/AgP7rfcfTDiI2/8k1sKw3A BrhibNWKBkxGbSGKYi9dYiM= X-Google-Smtp-Source: APXvYqwwuHKLgeZZS3Zu9/0E3rTD3OMjSCY97CYKvCPq+tRhVrb5y8aRMCcAX1lEzb3qRY8hDh99Og== X-Received: by 2002:adf:fa50:: with SMTP id y16mr7766913wrr.183.1581421155612; Tue, 11 Feb 2020 03:39:15 -0800 (PST) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id h10sm3497693wml.18.2020.02.11.03.39.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Feb 2020 03:39:14 -0800 (PST) From: luca.boccassi@gmail.com To: Somnath Kotur Cc: Kalesh AP , Ajit Khaparde , dpdk stable Date: Tue, 11 Feb 2020 11:21:21 +0000 Message-Id: <20200211112216.3929-135-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200211112216.3929-1-luca.boccassi@gmail.com> References: <20200211112216.3929-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/bnxt: fix max rings calculation' has been queued to stable release 19.11.1 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: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to stable release 19.11.1 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/13/20. 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. Thanks. Luca Boccassi --- >From 474de8140683a544f41b8eae93bfa4c92acd9638 Mon Sep 17 00:00:00 2001 From: Somnath Kotur Date: Thu, 16 Jan 2020 18:34:55 +0530 Subject: [PATCH] net/bnxt: fix max rings calculation [ upstream commit 93eb13bcb6baf5146798c23ef071ab2ae2489a4f ] Max Tx rings count could be lesser than max Rx rings in some cases, so take this into account as well. Account for stat contexts available(one for each ring) along with no: of completion rings(one for each ring) to cap the max no: of Tx /Rx rings that can be possibly created. Fixes: f03e66cb64ce ("net/bnxt: limit queue count for NS3/Stingray devices") Signed-off-by: Somnath Kotur Reviewed-by: Kalesh AP Reviewed-by: Ajit Khaparde --- drivers/net/bnxt/bnxt.h | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h index c818bede80..ca54c74155 100644 --- a/drivers/net/bnxt/bnxt.h +++ b/drivers/net/bnxt/bnxt.h @@ -619,12 +619,19 @@ struct bnxt { uint16_t max_tx_rings; uint16_t max_rx_rings; #define MAX_STINGRAY_RINGS 128U -#define BNXT_MAX_RINGS(bp) \ +/* For sake of symmetry, max Tx rings == max Rx rings, one stat ctx for each */ +#define BNXT_MAX_RX_RINGS(bp) \ (BNXT_STINGRAY(bp) ? RTE_MIN(RTE_MIN(bp->max_rx_rings, \ MAX_STINGRAY_RINGS), \ - bp->max_stat_ctx) : \ - RTE_MIN(bp->max_rx_rings, bp->max_stat_ctx)) + bp->max_stat_ctx / 2U) : \ + RTE_MIN(bp->max_rx_rings, \ + bp->max_stat_ctx / 2U)) +#define BNXT_MAX_TX_RINGS(bp) \ + (RTE_MIN((bp)->max_tx_rings, BNXT_MAX_RX_RINGS(bp))) +#define BNXT_MAX_RINGS(bp) \ + (RTE_MIN((((bp)->max_cp_rings - BNXT_NUM_ASYNC_CPR(bp)) / 2U), \ + BNXT_MAX_TX_RINGS(bp))) uint16_t max_nq_rings; uint16_t max_l2_ctx; uint16_t max_rx_em_flows; -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-02-11 11:17:43.387360114 +0000 +++ 0135-net-bnxt-fix-max-rings-calculation.patch 2020-02-11 11:17:38.644005910 +0000 @@ -1,8 +1,10 @@ -From 93eb13bcb6baf5146798c23ef071ab2ae2489a4f Mon Sep 17 00:00:00 2001 +From 474de8140683a544f41b8eae93bfa4c92acd9638 Mon Sep 17 00:00:00 2001 From: Somnath Kotur Date: Thu, 16 Jan 2020 18:34:55 +0530 Subject: [PATCH] net/bnxt: fix max rings calculation +[ upstream commit 93eb13bcb6baf5146798c23ef071ab2ae2489a4f ] + Max Tx rings count could be lesser than max Rx rings in some cases, so take this into account as well. @@ -11,7 +13,6 @@ Tx /Rx rings that can be possibly created. Fixes: f03e66cb64ce ("net/bnxt: limit queue count for NS3/Stingray devices") -Cc: stable@dpdk.org Signed-off-by: Somnath Kotur Reviewed-by: Kalesh AP @@ -21,10 +22,10 @@ 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h -index 3487b917ed..ddb26814ce 100644 +index c818bede80..ca54c74155 100644 --- a/drivers/net/bnxt/bnxt.h +++ b/drivers/net/bnxt/bnxt.h -@@ -622,12 +622,19 @@ struct bnxt { +@@ -619,12 +619,19 @@ struct bnxt { uint16_t max_tx_rings; uint16_t max_rx_rings; #define MAX_STINGRAY_RINGS 128U