From: Ajit Khaparde <ajit.khaparde@broadcom.com>
To: Dave Johnson <davejo@cisco.com>, Ferruh Yigit <ferruh.yigit@amd.com>
Cc: somnath.kotur@broadcom.com, dev@dpdk.org
Subject: Re: [PATCH] net/bnxt: limit max_vnics for CoS classification
Date: Tue, 21 Mar 2023 06:57:59 -0700 [thread overview]
Message-ID: <CACZ4nhvYmD_G5GDNoX-G0J6TQRoovfLLibp_E0qoYWkUd4Om1Q@mail.gmail.com> (raw)
In-Reply-To: <20230313200040.139415-1-davejo@cisco.com>
[-- Attachment #1: Type: text/plain, Size: 3315 bytes --]
On Mon, Mar 13, 2023 at 1:01 PM Dave Johnson <davejo@cisco.com> wrote:
>
> When using CoS classification the number of vnics is capped
> to avoid unnecessary memzone allocations.
>
> Signed-off-by: Dave Johnson <davejo@cisco.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Patch merged to dpdk-next-net-brcm. Thanks
> ---
> .mailmap | 1 +
> drivers/net/bnxt/bnxt.h | 1 +
> drivers/net/bnxt/bnxt_hwrm.c | 10 ++++++++--
> 3 files changed, 10 insertions(+), 2 deletions(-)
>
> diff --git a/.mailmap b/.mailmap
> index 4018f0fc47..ae52428557 100644
> --- a/.mailmap
> +++ b/.mailmap
> @@ -271,6 +271,7 @@ Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
> Darren Edamura <darren.edamura@broadcom.com>
> Dave Burley <dave.burley@accelercomm.com>
> Dave Ertman <david.m.ertman@intel.com>
> +Dave Johnson <davejo@cisco.com>
> David Binderman <dcb314@hotmail.com>
> David Bouyeure <david.bouyeure@fraudbuster.mobi>
> David Christensen <drc@linux.vnet.ibm.com> <david.christensen@broadcom.com>
> diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
> index f6eaaeb470..48bd8f2418 100644
> --- a/drivers/net/bnxt/bnxt.h
> +++ b/drivers/net/bnxt/bnxt.h
> @@ -811,6 +811,7 @@ struct bnxt {
> uint16_t max_l2_ctx;
> uint16_t max_rx_em_flows;
> uint16_t max_vnics;
> +#define BNXT_MAX_VNICS_COS_CLASSIFY 8
> uint16_t max_stat_ctx;
> uint16_t max_tpa_v2;
> uint16_t first_vf_id;
> diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
> index 51e1e2d6b3..d86ac73293 100644
> --- a/drivers/net/bnxt/bnxt_hwrm.c
> +++ b/drivers/net/bnxt/bnxt_hwrm.c
> @@ -902,7 +902,10 @@ static int __bnxt_hwrm_func_qcaps(struct bnxt *bp)
> bp->max_l2_ctx = rte_le_to_cpu_16(resp->max_l2_ctxs);
> if (!BNXT_CHIP_P5(bp) && !bp->pdev->max_vfs)
> bp->max_l2_ctx += bp->max_rx_em_flows;
> - bp->max_vnics = rte_le_to_cpu_16(resp->max_vnics);
> + if (bp->vnic_cap_flags & BNXT_VNIC_CAP_COS_CLASSIFY)
> + bp->max_vnics = rte_le_to_cpu_16(BNXT_MAX_VNICS_COS_CLASSIFY);
> + else
> + bp->max_vnics = rte_le_to_cpu_16(resp->max_vnics);
> PMD_DRV_LOG(DEBUG, "Max l2_cntxts is %d vnics is %d\n",
> bp->max_l2_ctx, bp->max_vnics);
> bp->max_stat_ctx = rte_le_to_cpu_16(resp->max_stat_ctx);
> @@ -1211,7 +1214,10 @@ int bnxt_hwrm_func_resc_qcaps(struct bnxt *bp)
> bp->max_l2_ctx = rte_le_to_cpu_16(resp->max_l2_ctxs);
> if (!BNXT_CHIP_P5(bp) && !bp->pdev->max_vfs)
> bp->max_l2_ctx += bp->max_rx_em_flows;
> - bp->max_vnics = rte_le_to_cpu_16(resp->max_vnics);
> + if (bp->vnic_cap_flags & BNXT_VNIC_CAP_COS_CLASSIFY)
> + bp->max_vnics = rte_le_to_cpu_16(BNXT_MAX_VNICS_COS_CLASSIFY);
> + else
> + bp->max_vnics = rte_le_to_cpu_16(resp->max_vnics);
> bp->max_stat_ctx = rte_le_to_cpu_16(resp->max_stat_ctx);
> bp->max_nq_rings = rte_le_to_cpu_16(resp->max_msix);
> bp->vf_resv_strategy = rte_le_to_cpu_16(resp->vf_reservation_strategy);
> --
> 2.35.6
>
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4218 bytes --]
prev parent reply other threads:[~2023-03-21 13:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-13 20:00 Dave Johnson
2023-03-21 13:57 ` Ajit Khaparde [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CACZ4nhvYmD_G5GDNoX-G0J6TQRoovfLLibp_E0qoYWkUd4Om1Q@mail.gmail.com \
--to=ajit.khaparde@broadcom.com \
--cc=davejo@cisco.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@amd.com \
--cc=somnath.kotur@broadcom.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).