[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Z4btu5YT8I9fQlV2@LQ3V64L9R2>
Date: Tue, 14 Jan 2025 15:05:31 -0800
From: Joe Damato <jdamato@...tly.com>
To: Gerhard Engleder <gerhard@...leder-embedded.com>
Cc: andrew@...n.ch, davem@...emloft.net, edumazet@...gle.com,
kuba@...nel.org, pabeni@...hat.com, netdev@...r.kernel.org
Subject: Re: [PATCH net-next] tsnep: Link queues to NAPIs
On Fri, Jan 10, 2025 at 11:39:39PM +0100, Gerhard Engleder wrote:
> Use netif_queue_set_napi() to link queues to NAPI instances so that they
> can be queried with netlink.
>
> $ ./tools/net/ynl/cli.py --spec Documentation/netlink/specs/netdev.yaml \
> --dump queue-get --json='{"ifindex": 11}'
> [{'id': 0, 'ifindex': 11, 'napi-id': 9, 'type': 'rx'},
> {'id': 1, 'ifindex': 11, 'napi-id': 10, 'type': 'rx'},
> {'id': 0, 'ifindex': 11, 'napi-id': 9, 'type': 'tx'},
> {'id': 1, 'ifindex': 11, 'napi-id': 10, 'type': 'tx'}]
>
> Additionally use netif_napi_set_irq() to also provide NAPI interrupt
> number to userspace.
>
> $ ./tools/net/ynl/cli.py --spec Documentation/netlink/specs/netdev.yaml \
> --do napi-get --json='{"id": 9}'
> {'defer-hard-irqs': 0,
> 'gro-flush-timeout': 0,
> 'id': 9,
> 'ifindex': 11,
> 'irq': 42,
> 'irq-suspend-timeout': 0}
>
> Providing information about queues to userspace makes sense as APIs like
> XSK provide queue specific access. Also XSK busy polling relies on
> queues linked to NAPIs.
>
> Signed-off-by: Gerhard Engleder <gerhard@...leder-embedded.com>
> ---
> drivers/net/ethernet/engleder/tsnep_main.c | 28 ++++++++++++++++++----
> 1 file changed, 23 insertions(+), 5 deletions(-)
Sorry for diverting your thread with the questions around XDP.
Based on the conversation, this patch looks good to me.
Reviewed-by: Joe Damato <jdamato@...tly.com>
Powered by blists - more mailing lists