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 463ADA00C2; Fri, 24 Apr 2020 19:58:56 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B71A01D506; Fri, 24 Apr 2020 19:58:55 +0200 (CEST) Received: from mail-ot1-f67.google.com (mail-ot1-f67.google.com [209.85.210.67]) by dpdk.org (Postfix) with ESMTP id E6DBC1D44A for ; Fri, 24 Apr 2020 19:58:53 +0200 (CEST) Received: by mail-ot1-f67.google.com with SMTP id e26so13937671otr.2 for ; Fri, 24 Apr 2020 10:58:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=AlmRI8QWRJsRWe6McZ+lsxChRZmkdRUdbfdxO3CCoYI=; b=Df6Eg5f3CVUbR/Xf4ak6mtFaT5u+KGuUm9ys5dzxat+poj8FvE+i1/qGqXPscyMpwu iu3Bk+kB9d4O61eJIlFN1aFTnHQCbMEwH0WyX+BNFcVZHvrjgE97WZ0jFlB2t+YyGmf6 ff7Pscze+wQ6Z/hjtvtuVuMs8w0iB/n0e1Qgg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=AlmRI8QWRJsRWe6McZ+lsxChRZmkdRUdbfdxO3CCoYI=; b=i+2QpFz7dCul7x/ZjOFLSlgr5tT+QWoVzc0+wt85Zg0Bjy7jBbHrvY+wl+wjD6QKdZ ZYw/tgoIGijThJ8JCcnEmMG3KQU41porMkOC+VRxC5qJCq9BaNE9pHQQQO+5SCGlpLl+ tmb+jWgy4qWJRHsoWXm+IX2wDnrW+R3Mi/fLkUcJQD62Xc6V6ndw8nmz1ZQUv3zxIFJi PnGyWb0PB5pcs+RK9QKlHaPVwCigsRVe5Up+IPdla+Q1NZ5V7QOVfyywKoTSjrdCLFGN CSZ3ydpFZchs0aEA76/pHe0UPoDyjN8o9r8jDRV/2/fLH1zIYJ13BzZQtsjMpXFtdq0e Tzdg== X-Gm-Message-State: AGi0PuYvPOQZcPb7Bnx4+BQfjMeqrUPvruZ9GyclSUXO3Xu/P9SqdxMa vEsILZuCYelkN1NPFWnUb9ZHWRVWwf9/N15xKYrrMeLYevA= X-Google-Smtp-Source: APiQypJi/0Ryzn+rzKwbhYvIDgTNDFhPKm1ijvHTFq8vQPsGxzxL9zAiq2LklfIRkrG+MDEOV4ZhSGS341W36rtyD3Y= X-Received: by 2002:a9d:de2:: with SMTP id 89mr8117478ots.95.1587751133103; Fri, 24 Apr 2020 10:58:53 -0700 (PDT) MIME-Version: 1.0 References: <20200424110054.2668-1-somnath.kotur@broadcom.com> In-Reply-To: <20200424110054.2668-1-somnath.kotur@broadcom.com> From: Ajit Khaparde Date: Fri, 24 Apr 2020 10:58:37 -0700 Message-ID: To: Somnath Kotur Cc: dpdk-dev , Ferruh Yigit Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH] net/bnxt: fix max ring count calculation 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" On Fri, Apr 24, 2020 at 4:04 AM Somnath Kotur wrote: > Max Rx Ring count could be < Max stat contexts. While accounting > for stat contexts, this should be also considered and > the max ring count adjusted accordingly. > > Fixes: f03e66cb64ce ("net/bnxt: limit queue count for NS3/Stingray > devices") > Cc: stable@dpdk.org > > Signed-off-by: Somnath Kotur > Patch applied to dpdk-next-net-brcm. > --- > drivers/net/bnxt/bnxt.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h > index 586d3f5..12fed1e 100644 > --- a/drivers/net/bnxt/bnxt.h > +++ b/drivers/net/bnxt/bnxt.h > @@ -653,10 +653,10 @@ struct bnxt { > #define MAX_STINGRAY_RINGS 128U > /* 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, \ > + (BNXT_STINGRAY(bp) ? RTE_MIN(RTE_MIN(bp->max_rx_rings / 2U, \ > MAX_STINGRAY_RINGS), \ > bp->max_stat_ctx / 2U) : \ > - RTE_MIN(bp->max_rx_rings, \ > + RTE_MIN(bp->max_rx_rings / 2U, \ > bp->max_stat_ctx / 2U)) > #define BNXT_MAX_TX_RINGS(bp) \ > (RTE_MIN((bp)->max_tx_rings, BNXT_MAX_RX_RINGS(bp))) > -- > 1.8.3.1 > >