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 EEC9EA0524 for ; Fri, 5 Feb 2021 12:21:33 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E5BD34067B; Fri, 5 Feb 2021 12:21:33 +0100 (CET) Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) by mails.dpdk.org (Postfix) with ESMTP id B3E694067B for ; Fri, 5 Feb 2021 12:21:30 +0100 (CET) Received: by mail-wm1-f46.google.com with SMTP id y187so5620960wmd.3 for ; Fri, 05 Feb 2021 03:21:30 -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=iTdGrx5vijc+q9Zr6gXyMI5NMddhprjMj1whtdujSVM=; b=cR2mA+NXqerk3zR+AcwXOcRcWjGRhe69z8Ic2ISrEfdNpVAlUREcqItNJimWJLS1g2 GbCd92LgAAHjBeslsZPtUhwpImpMvyEOAl2iOdhM2F7TQjgMtgX1h7VM9lGHn0zDB4wk zIvEeZIIPtiPKGcKVDEm2gmnsTpK/sWr8dsJfgYciVpfFh+C1+/Ugsz96njTXYlzNpqc aljWyTFssq73PoZ8lalOOOb6NNXO7y4b7dAvzTFwQSW9LdU9BeXfYire4bKcimoSfeIj dfRNd4/zojY4UQrh/MweECPmbWqhhRLTU7ESIHZx91jAsIbOm0rQdWWQTtxUJ4oQDm4h n3TA== 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=iTdGrx5vijc+q9Zr6gXyMI5NMddhprjMj1whtdujSVM=; b=dsCwHrKffX6NoN2ihp1In9l+elQ0vfBP10XXYAgwmecagHt4FpRR9l+tD5J+KWpsgy /mK8SAIQLHC2Hnwbo40j2d+reR2ofEH+1t0AZcuyKpbh5MPraxb4Tz5mxJTdj8CZx1QK Vt52ZVvPaxurqW3T9Icra2yifHU96vVW4BUfwKrZi2n6M5Y0+PuFpmosExpYXnsaoZ9L pU+PQx/NSaeCyHw628sViLec24QnGzrq+f+9SDIfVsZtwXkug+C3jSBJTVAr4zKe8y0V XqhafAT5Wnbs6xRU9MlZChVN7qHDvk2tMDy0Dd4gZW5ScDtxykx0+p15Aex9As7IbM9N 73gA== X-Gm-Message-State: AOAM530bg4DbRDApaY3UQxUQjnd6DdI0tsdUUIvDxhYK77HdSTiD0oMt 3mAHwnEyh/nQH556uhzV4RmzWk0MB5DHBGLX X-Google-Smtp-Source: ABdhPJxw4IjzCksvE15o1aGeSh/vdzWQTl7N08V7F+xrgOqDn/7A0I9fivospoZ/87OwWaLsIuCMPQ== X-Received: by 2002:a1c:1c9:: with SMTP id 192mr1168052wmb.150.1612524090471; Fri, 05 Feb 2021 03:21:30 -0800 (PST) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id i6sm11310449wrv.21.2021.02.05.03.21.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Feb 2021 03:21:29 -0800 (PST) From: luca.boccassi@gmail.com To: Samik Gupta Cc: Ajit Khaparde , dpdk stable Date: Fri, 5 Feb 2021 11:15:25 +0000 Message-Id: <20210205111920.1272063-39-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210205111920.1272063-1-luca.boccassi@gmail.com> References: <20210205111920.1272063-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/bnxt: fix Rx rings in RSS redirection table' has been queued to stable release 20.11.1 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 Sender: "stable" Hi, FYI, your patch has been queued to stable release 20.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/07/21. 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/906f23c4c0805a2bb9bb89d1e46c5201c0461a6a Thanks. Luca Boccassi --- >From 906f23c4c0805a2bb9bb89d1e46c5201c0461a6a Mon Sep 17 00:00:00 2001 From: Samik Gupta Date: Thu, 12 Nov 2020 13:28:25 -0800 Subject: [PATCH] net/bnxt: fix Rx rings in RSS redirection table [ upstream commit d424af43e6c32aec83be8f1380271ff33ed0b89a ] This commit introduces a limit on the number of RX rings included in the RSS redirection table to a value no larger than the size supported by Thor as defined by BNXT_RSS_TBL_SIZE_THOR. Fixes: d819382543f3 ("net/bnxt: add RSS redirection table operations") Reviewed-by: Ajit Khaparde Signed-off-by: Samik Gupta --- drivers/net/bnxt/bnxt.h | 2 +- drivers/net/bnxt/bnxt_ethdev.c | 15 +++++++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h index 90ced972c0..9bd4f1da97 100644 --- a/drivers/net/bnxt/bnxt.h +++ b/drivers/net/bnxt/bnxt.h @@ -389,7 +389,7 @@ struct bnxt_coal { #define DBR_TYPE_NQ (0xaULL << 60) #define DBR_TYPE_NQ_ARM (0xbULL << 60) -#define BNXT_RSS_TBL_SIZE_THOR 512 +#define BNXT_RSS_TBL_SIZE_THOR 512U #define BNXT_RSS_ENTRIES_PER_CTX_THOR 64 #define BNXT_MAX_RSS_CTXTS_THOR \ (BNXT_RSS_TBL_SIZE_THOR / BNXT_RSS_ENTRIES_PER_CTX_THOR) diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c index 81c8f8d79d..c363c8427a 100644 --- a/drivers/net/bnxt/bnxt_ethdev.c +++ b/drivers/net/bnxt/bnxt_ethdev.c @@ -207,12 +207,15 @@ int is_bnxt_in_error(struct bnxt *bp) static uint16_t bnxt_rss_ctxts(const struct bnxt *bp) { + unsigned int num_rss_rings = RTE_MIN(bp->rx_nr_rings, + BNXT_RSS_TBL_SIZE_THOR); + if (!BNXT_CHIP_THOR(bp)) return 1; - return RTE_ALIGN_MUL_CEIL(bp->rx_nr_rings, + return RTE_ALIGN_MUL_CEIL(num_rss_rings, BNXT_RSS_ENTRIES_PER_CTX_THOR) / - BNXT_RSS_ENTRIES_PER_CTX_THOR; + BNXT_RSS_ENTRIES_PER_CTX_THOR; } uint16_t bnxt_rss_hash_tbl_size(const struct bnxt *bp) @@ -424,6 +427,14 @@ static int bnxt_setup_one_vnic(struct bnxt *bp, uint16_t vnic_id) if (dev_conf->rxmode.mq_mode & ETH_MQ_RX_RSS) { int j, nr_ctxs = bnxt_rss_ctxts(bp); + if (bp->rx_nr_rings > BNXT_RSS_TBL_SIZE_THOR) { + PMD_DRV_LOG(ERR, "RxQ cnt %d > reta_size %d\n", + bp->rx_nr_rings, BNXT_RSS_TBL_SIZE_THOR); + PMD_DRV_LOG(ERR, + "Only queues 0-%d will be in RSS table\n", + BNXT_RSS_TBL_SIZE_THOR - 1); + } + rc = 0; for (j = 0; j < nr_ctxs; j++) { rc = bnxt_hwrm_vnic_ctx_alloc(bp, vnic, j); -- 2.29.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-02-05 11:18:31.048465806 +0000 +++ 0039-net-bnxt-fix-Rx-rings-in-RSS-redirection-table.patch 2021-02-05 11:18:28.706689208 +0000 @@ -1 +1 @@ -From d424af43e6c32aec83be8f1380271ff33ed0b89a Mon Sep 17 00:00:00 2001 +From 906f23c4c0805a2bb9bb89d1e46c5201c0461a6a Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit d424af43e6c32aec83be8f1380271ff33ed0b89a ] + @@ -11 +12,0 @@ -Cc: stable@dpdk.org