mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Gerhard Engleder <gerhard@engleder-embedded.com>
To: Joe Damato <jdamato@fastly.com>, netdev@vger.kernel.org
Cc: jasowang@redhat.com, leiyang@redhat.com,
	xuanzhuo@linux.alibaba.com, mkarsten@uwaterloo.ca,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"Eugenio Pérez" <eperezma@redhat.com>,
	"Andrew Lunn" <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	"Eric Dumazet" <edumazet@google.com>,
	"Jakub Kicinski" <kuba@kernel.org>,
	"Paolo Abeni" <pabeni@redhat.com>,
	"open list:VIRTIO CORE AND NET DRIVERS"
	<virtualization@lists.linux.dev>,
	"open list" <linux-kernel@vger.kernel.org>
Subject: Re: [RFC net-next v3 3/4] virtio_net: Map NAPIs to queues
Date: Tue, 21 Jan 2025 21:13:48 +0100	[thread overview]
Message-ID: <5b43d53d-5ab1-43da-b327-74ca29c29fad@engleder-embedded.com> (raw)
In-Reply-To: <20250121191047.269844-4-jdamato@fastly.com>

On 21.01.25 20:10, Joe Damato wrote:
> Use netif_queue_set_napi to map NAPIs to queue IDs so that the mapping
> can be accessed by user apps.
> 
> $ ethtool -i ens4 | grep driver
> driver: virtio_net
> 
> $ sudo ethtool -L ens4 combined 4
> 
> $ ./tools/net/ynl/pyynl/cli.py \
>         --spec Documentation/netlink/specs/netdev.yaml \
>         --dump queue-get --json='{"ifindex": 2}'
> [{'id': 0, 'ifindex': 2, 'napi-id': 8289, 'type': 'rx'},
>   {'id': 1, 'ifindex': 2, 'napi-id': 8290, 'type': 'rx'},
>   {'id': 2, 'ifindex': 2, 'napi-id': 8291, 'type': 'rx'},
>   {'id': 3, 'ifindex': 2, 'napi-id': 8292, 'type': 'rx'},
>   {'id': 0, 'ifindex': 2, 'type': 'tx'},
>   {'id': 1, 'ifindex': 2, 'type': 'tx'},
>   {'id': 2, 'ifindex': 2, 'type': 'tx'},
>   {'id': 3, 'ifindex': 2, 'type': 'tx'}]
> 
> Note that virtio_net has TX-only NAPIs which do not have NAPI IDs, so
> the lack of 'napi-id' in the above output is expected.
> 
> Signed-off-by: Joe Damato <jdamato@fastly.com>
> ---
>   rfcv3:
>     - Eliminated XDP checks; NAPIs will always be mapped to RX queues, as
>       Gerhard Engleder suggested.
> 
>   v2:
>     - Eliminate RTNL code paths using the API Jakub introduced in patch 1
>       of this v2.
>     - Added virtnet_napi_disable to reduce code duplication as
>       suggested by Jason Wang.
> 
>   drivers/net/virtio_net.c | 23 +++++++++++++++++++----
>   1 file changed, 19 insertions(+), 4 deletions(-)

Looks good to me. I hope I didn't get you on the wrong track!

Reviewed-by: Gerhard Engleder <gerhard@engleder-embedded.com>

  reply	other threads:[~2025-01-21 20:14 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-21 19:10 [RFC net-next v3 0/4] virtio_net: Link queues to NAPIs Joe Damato
2025-01-21 19:10 ` [RFC net-next v3 1/4] net: protect queue -> napi linking with netdev_lock() Joe Damato
2025-01-27 21:37   ` Jakub Kicinski
2025-01-27 22:21     ` Joe Damato
2025-01-21 19:10 ` [RFC net-next v3 2/4] virtio_net: Prepare for NAPI to queue mapping Joe Damato
2025-01-22  6:12   ` Jason Wang
2025-01-22 17:40     ` Joe Damato
2025-01-23  2:40       ` Jason Wang
2025-01-23  2:47         ` Joe Damato
2025-01-24  1:14           ` Jason Wang
2025-01-24 20:19             ` Joe Damato
2025-01-26  8:04               ` Jason Wang
2025-01-27 17:52                 ` Joe Damato
2025-01-27 19:31                   ` Joe Damato
2025-01-27 21:33                     ` Jakub Kicinski
2025-01-27 22:07                       ` Joe Damato
2025-01-27 22:24                         ` Jakub Kicinski
2025-01-27 22:32                           ` Joe Damato
2025-01-21 19:10 ` [RFC net-next v3 3/4] virtio_net: Map NAPIs to queues Joe Damato
2025-01-21 20:13   ` Gerhard Engleder [this message]
2025-01-22  6:13   ` Jason Wang
2025-01-21 19:10 ` [RFC net-next v3 4/4] virtio_net: Use persistent NAPI config Joe Damato
2025-01-21 20:18   ` Gerhard Engleder
2025-01-22  6:13   ` Jason Wang

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=5b43d53d-5ab1-43da-b327-74ca29c29fad@engleder-embedded.com \
    --to=gerhard@engleder-embedded.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=eperezma@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=jdamato@fastly.com \
    --cc=kuba@kernel.org \
    --cc=leiyang@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mkarsten@uwaterloo.ca \
    --cc=mst@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=virtualization@lists.linux.dev \
    --cc=xuanzhuo@linux.alibaba.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®