From: "Nambiar, Amritha" <amritha.nambiar@intel•com>
To: Jakub Kicinski <kuba@kernel•org>
Cc: <michael.chan@broadcom•com>, <netdev@vger•kernel.org>
Subject: Re: [PATCH 11/10] eth: bnxt: link NAPI instances to queues and IRQs
Date: Tue, 21 Nov 2023 13:31:08 -0800 [thread overview]
Message-ID: <416f1dfd-c1db-428a-a8b3-4cb3ceac8505@intel.com> (raw)
In-Reply-To: <20231120235611.788520-1-kuba@kernel.org>
On 11/20/2023 3:56 PM, Jakub Kicinski wrote:
> Make bnxt compatible with the newly added netlink queue GET APIs.
>
> Signed-off-by: Jakub Kicinski <kuba@kernel•org>
Thanks. Will add this as patch-11 to v9 of my series
(Introduce queue and NAPI support in netdev-genl).
> ---
> drivers/net/ethernet/broadcom/bnxt/bnxt.c | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
> diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
> index e6ac1bd21bb3..ee4f4fc38bb5 100644
> --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
> +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
> @@ -3835,6 +3835,9 @@ static int bnxt_init_one_rx_ring(struct bnxt *bp, int ring_nr)
> ring = &rxr->rx_ring_struct;
> bnxt_init_rxbd_pages(ring, type);
>
> + netif_queue_set_napi(bp->dev, ring_nr, NETDEV_QUEUE_TYPE_RX,
> + &rxr->bnapi->napi);
> +
> if (BNXT_RX_PAGE_MODE(bp) && bp->xdp_prog) {
> bpf_prog_add(bp->xdp_prog, 1);
> rxr->xdp_prog = bp->xdp_prog;
> @@ -3911,6 +3914,9 @@ static int bnxt_init_tx_rings(struct bnxt *bp)
> struct bnxt_ring_struct *ring = &txr->tx_ring_struct;
>
> ring->fw_ring_id = INVALID_HW_RING_ID;
> +
> + netif_queue_set_napi(bp->dev, i, NETDEV_QUEUE_TYPE_TX,
> + &txr->bnapi->napi);
> }
>
> return 0;
> @@ -9536,6 +9542,7 @@ static int bnxt_request_irq(struct bnxt *bp)
> if (rc)
> break;
>
> + netif_napi_set_irq(&bp->bnapi[i]->napi, irq->vector);
> irq->requested = 1;
>
> if (zalloc_cpumask_var(&irq->cpu_mask, GFP_KERNEL)) {
> @@ -9563,6 +9570,11 @@ static void bnxt_del_napi(struct bnxt *bp)
> if (!bp->bnapi)
> return;
>
> + for (i = 0; i < bp->rx_nr_rings; i++)
> + netif_queue_set_napi(bp->dev, i, NETDEV_QUEUE_TYPE_RX, NULL);
> + for (i = 0; i < bp->tx_nr_rings; i++)
> + netif_queue_set_napi(bp->dev, i, NETDEV_QUEUE_TYPE_TX, NULL);
> +
> for (i = 0; i < bp->cp_nr_rings; i++) {
> struct bnxt_napi *bnapi = bp->bnapi[i];
>
prev parent reply other threads:[~2023-11-21 21:31 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-17 1:16 [net-next PATCH v8 00/10] Introduce queue and NAPI support in netdev-genl (Was: Introduce NAPI queues support) Amritha Nambiar
2023-11-17 1:16 ` [net-next PATCH v8 01/10] netdev-genl: spec: Extend netdev netlink spec in YAML for queue Amritha Nambiar
2023-11-17 1:16 ` [net-next PATCH v8 02/10] net: Add queue and napi association Amritha Nambiar
2023-11-20 23:54 ` Jakub Kicinski
2023-11-21 21:26 ` Nambiar, Amritha
2023-11-21 22:22 ` Jakub Kicinski
2023-11-22 0:08 ` Nambiar, Amritha
2023-11-22 1:15 ` Jakub Kicinski
2023-11-22 21:28 ` Nambiar, Amritha
2023-11-22 22:00 ` Jakub Kicinski
2023-11-23 0:56 ` Nambiar, Amritha
2023-11-17 1:16 ` [net-next PATCH v8 03/10] ice: Add support in the driver for associating queue with napi Amritha Nambiar
2023-11-17 1:16 ` [net-next PATCH v8 04/10] netdev-genl: Add netlink framework functions for queue Amritha Nambiar
2023-11-17 1:17 ` [net-next PATCH v8 05/10] netdev-genl: spec: Extend netdev netlink spec in YAML for NAPI Amritha Nambiar
2023-11-17 1:17 ` [net-next PATCH v8 06/10] netdev-genl: Add netlink framework functions for napi Amritha Nambiar
2023-11-17 1:17 ` [net-next PATCH v8 07/10] netdev-genl: spec: Add irq in netdev netlink YAML spec Amritha Nambiar
2023-11-17 1:17 ` [net-next PATCH v8 08/10] net: Add NAPI IRQ support Amritha Nambiar
2023-11-17 1:17 ` [net-next PATCH v8 09/10] netdev-genl: spec: Add PID in netdev netlink YAML spec Amritha Nambiar
2023-11-17 1:17 ` [net-next PATCH v8 10/10] netdev-genl: Add PID for the NAPI thread Amritha Nambiar
2023-11-20 23:56 ` [PATCH 11/10] eth: bnxt: link NAPI instances to queues and IRQs Jakub Kicinski
2023-11-21 21:31 ` Nambiar, Amritha [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=416f1dfd-c1db-428a-a8b3-4cb3ceac8505@intel.com \
--to=amritha.nambiar@intel$(echo .)com \
--cc=kuba@kernel$(echo .)org \
--cc=michael.chan@broadcom$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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