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 BA0D7A0524; Tue, 20 Apr 2021 01:57:15 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A741641448; Tue, 20 Apr 2021 01:57:15 +0200 (CEST) Received: from mail-qk1-f179.google.com (mail-qk1-f179.google.com [209.85.222.179]) by mails.dpdk.org (Postfix) with ESMTP id 3342A40685 for ; Tue, 20 Apr 2021 01:57:15 +0200 (CEST) Received: by mail-qk1-f179.google.com with SMTP id h13so19048623qka.2 for ; Mon, 19 Apr 2021 16:57:15 -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=kBvTa7WMomiWDqdkOdCDA0R7hFyi7isOOnHpgW4MQuA=; b=d5dXMQyoykNA1owXalfjUxPLrN7XbXfbr0GkqVTAm3n65NRVpjQC5rkCvyoOpExS4r q2FTOvtLJIVemYW40r/cPfynmraF8n/IEt0RwQcAiAXgEW6CaMvjOipUj6HbSrFGzN2v RNMH+o9Y3HDSufRLyR46q5/ycUaS1pQF4EpLk= 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=kBvTa7WMomiWDqdkOdCDA0R7hFyi7isOOnHpgW4MQuA=; b=jV1Iv2TEjZkhLb0o77l90gA8Q4ubeqe7lhHB6ZagxdaEsZK+2l3cD80MCQOywXU5+b 4nHqmZHueID//kMWea5hhlFqyDxS/RNFrrGO8Amfc6veBbkxZ3NXcH0szabW1rU5ZDcx FINpR1EBZ3ujmQVIhkaIa0U0C5LKGD1D53zqyogtzgj/JBsaNp6sFYR6v5QJPmFdGL+C Rqm4iD1smYt2geNBLladcGZsBT/gUwiivc/3Ft8j9gpPf/AXMdKQcF0qkcr7fawn4kFP ax+nrJ3r7SPAVfK7nDTI3Kq3e+MoGXKWRhHX+tted1rxxLBhuvPP+BA8TzXvOSZZZcat L4RQ== X-Gm-Message-State: AOAM532Ze+lFMpDjcw1pSC0tiZblNM2WQNgIXXP/x7g0gRtLCvzr8KXN gdF7jGIrwLoBvdt4ZaXKCDf6f2bbM9/h+V+Bu2yMsPyVkbxoZQ== X-Google-Smtp-Source: ABdhPJxi1mEsBqtkEkhJXsUFkCQTRK2uTzCvbXqEAEU6Eri2WTPwG9xSMktbM1fCDcp2Nf/fWfKohFzopvqzWET1K7c= X-Received: by 2002:a05:620a:6ce:: with SMTP id 14mr14635684qky.423.1618876634321; Mon, 19 Apr 2021 16:57:14 -0700 (PDT) MIME-Version: 1.0 References: <20210419192838.45708-1-ajit.khaparde@broadcom.com> <20210419192838.45708-2-ajit.khaparde@broadcom.com> In-Reply-To: <20210419192838.45708-2-ajit.khaparde@broadcom.com> From: Ajit Khaparde Date: Mon, 19 Apr 2021 16:56:58 -0700 Message-ID: To: dpdk-dev Cc: Lance Richardson Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-256; boundary="000000000000be558505c05c16a9" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: Re: [dpdk-dev] [PATCH 2/2] net/bnxt: cap max Rx rings for Thor X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" --000000000000be558505c05c16a9 Content-Type: text/plain; charset="UTF-8" On Mon, Apr 19, 2021 at 12:28 PM Ajit Khaparde wrote: > > For Thor devices, RSS table can only accommodate 512 Rx queues. > When RSS is enabled, Cap the max Rx rings to 512. > For non-RSS case, the number will be limited by number of VNICs. > > Signed-off-by: Ajit Khaparde > Reviewed-by: Lance Richardson Patch applied to dpdk-next-net-brcm. Fixed the checkpatch error during merge. > --- > drivers/net/bnxt/bnxt.h | 13 +++++++++++++ > drivers/net/bnxt/bnxt_ethdev.c | 7 ++++--- > 2 files changed, 17 insertions(+), 3 deletions(-) > > diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h > index 05f8804274..263ea86590 100644 > --- a/drivers/net/bnxt/bnxt.h > +++ b/drivers/net/bnxt/bnxt.h > @@ -844,6 +844,7 @@ struct bnxt { > static > inline uint16_t bnxt_max_rings(struct bnxt *bp) > { > + struct rte_eth_conf *dev_conf = &bp->eth_dev->data->dev_conf; > uint16_t max_tx_rings = bp->max_tx_rings; > uint16_t max_rx_rings = bp->max_rx_rings; > uint16_t max_cp_rings = bp->max_cp_rings; > @@ -861,6 +862,18 @@ inline uint16_t bnxt_max_rings(struct bnxt *bp) > bp->max_stat_ctx / 2U); > } > > + if (BNXT_CHIP_P5(bp)) { > + /* RSS table size in Thor is 512. > + * Cap max Rx rings to the same value for RSS. > + * For non-RSS case cap it to the max VNIC count. > + */ > + if(dev_conf->rxmode.mq_mode & ETH_MQ_RX_RSS_FLAG) > + max_rx_rings = RTE_MIN(max_rx_rings, > + BNXT_RSS_TBL_SIZE_P5); > + else > + max_rx_rings = RTE_MIN(max_rx_rings, bp->max_vnics); > + } > + > max_tx_rings = RTE_MIN(max_tx_rings, max_rx_rings); > if (max_cp_rings > BNXT_NUM_ASYNC_CPR(bp)) > max_cp_rings -= BNXT_NUM_ASYNC_CPR(bp); > diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c > index dc3b04110f..9da817f487 100644 > --- a/drivers/net/bnxt/bnxt_ethdev.c > +++ b/drivers/net/bnxt/bnxt_ethdev.c > @@ -422,12 +422,13 @@ 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); > > + /* RSS table size in Thor is 512. > + * Cap max Rx rings to same value > + */ > if (bp->rx_nr_rings > BNXT_RSS_TBL_SIZE_P5) { > PMD_DRV_LOG(ERR, "RxQ cnt %d > reta_size %d\n", > bp->rx_nr_rings, BNXT_RSS_TBL_SIZE_P5); > - PMD_DRV_LOG(ERR, > - "Only queues 0-%d will be in RSS table\n", > - BNXT_RSS_TBL_SIZE_P5 - 1); > + goto err_out; > } > > rc = 0; > -- > 2.21.1 (Apple Git-122.3) > --000000000000be558505c05c16a9--