From: Tony Nguyen <anthony.l.nguyen@intel.com>
To: Samiullah Khawaja <skhawaja@google.com>,
Przemek Kitszel <przemyslaw.kitszel@intel.com>,
"David S. Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
<intel-wired-lan@lists.osuosl.org>,
Alexander Lobakin <aleksander.lobakin@intel.com>
Cc: <willemb@google.com>, <almasrymina@google.com>,
David Decotigny <decot@google.com>,
Anjali Singhai <anjali.singhai@intel.com>,
"Sridhar Samudrala" <sridhar.samudrala@intel.com>,
<linux-kernel@vger.kernel.org>, <netdev@vger.kernel.org>,
<emil.s.tantilov@intel.com>
Subject: Re: [PATCH iwl-next] idpf: set napi for each TX and RX queue
Date: Thu, 17 Jul 2025 13:25:05 -0700 [thread overview]
Message-ID: <efbcade2-ca5a-43ad-9512-846be207eb56@intel.com> (raw)
In-Reply-To: <20250716211230.3592838-1-skhawaja@google.com>
On 7/16/2025 2:12 PM, Samiullah Khawaja wrote:
> Use netif_queue_set_napi to associate TX/RX queues to the relevant napi.
> This allows fetching napi for a TX or RX queue using netlink queue-get
> op.
>
> Tested:
> python3 tools/net/ynl/pyynl/cli.py \
> --spec Documentation/netlink/specs/netdev.yaml \
> --do queue-get --json '{"ifindex": 3, "type": "rx", "id": 2}'
> {'id': 2, 'ifindex': 3, 'napi-id': 515, 'type': 'rx'}
Hi Samiullah,
Thanks for the patch. We do, however, have this functionality already in
flight [1].
Thanks,
Tony
[1]
https://lore.kernel.org/intel-wired-lan/20250624164515.2663137-4-aleksander.lobakin@intel.com/
> Signed-off-by: Samiullah Khawaja <skhawaja@google.com>
> ---
> drivers/net/ethernet/intel/idpf/idpf_txrx.c | 16 +++++++++++++++-
> 1 file changed, 15 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/intel/idpf/idpf_txrx.c b/drivers/net/ethernet/intel/idpf/idpf_txrx.c
> index bf23967674d5..f01e72fb73e8 100644
> --- a/drivers/net/ethernet/intel/idpf/idpf_txrx.c
> +++ b/drivers/net/ethernet/intel/idpf/idpf_txrx.c
> @@ -4373,7 +4373,7 @@ static void idpf_vport_intr_napi_add_all(struct idpf_vport *vport,
> struct idpf_q_vec_rsrc *rsrc)
> {
> int (*napi_poll)(struct napi_struct *napi, int budget);
> - int irq_num;
> + int i, irq_num;
> u16 qv_idx;
>
> if (idpf_is_queue_model_split(rsrc->txq_model))
> @@ -4390,6 +4390,20 @@ static void idpf_vport_intr_napi_add_all(struct idpf_vport *vport,
> netif_napi_add_config(vport->netdev, &q_vector->napi,
> napi_poll, v_idx);
> netif_napi_set_irq(&q_vector->napi, irq_num);
> +
> + for (i = 0; i < q_vector->num_rxq; ++i) {
> + netif_queue_set_napi(vport->netdev,
> + q_vector->rx[i]->idx,
> + NETDEV_QUEUE_TYPE_RX,
> + &q_vector->napi);
> + }
> +
> + for (i = 0; i < q_vector->num_txq; ++i) {
> + netif_queue_set_napi(vport->netdev,
> + q_vector->tx[i]->idx,
> + NETDEV_QUEUE_TYPE_TX,
> + &q_vector->napi);
> + }
> }
> }
>
>
> base-commit: 4cc8116d6c4ef909e52868c1251ed6eff8c5010b
next prev parent reply other threads:[~2025-07-17 20:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-16 21:12 Samiullah Khawaja
2025-07-17 20:25 ` Tony Nguyen [this message]
2025-07-18 13:06 ` Alexander Lobakin
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=efbcade2-ca5a-43ad-9512-846be207eb56@intel.com \
--to=anthony.l.nguyen@intel.com \
--cc=aleksander.lobakin@intel.com \
--cc=almasrymina@google.com \
--cc=anjali.singhai@intel.com \
--cc=davem@davemloft.net \
--cc=decot@google.com \
--cc=edumazet@google.com \
--cc=emil.s.tantilov@intel.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=przemyslaw.kitszel@intel.com \
--cc=skhawaja@google.com \
--cc=sridhar.samudrala@intel.com \
--cc=willemb@google.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
all inboxes | Powered by JetHome®