Message ID | 20240930210731.1629-2-jdamato@fastly.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 3017238b60d394d01f2596e07343ca494b6dd2c0 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | gve: Link IRQs, queues, and NAPI instances | expand |
On Mon, Sep 30, 2024 at 2:07 PM Joe Damato <jdamato@fastly.com> wrote: > > Use netdev-genl interface to map IRQs to NAPI instances so that this > information is accessible by user apps via netlink. > > $ cat /proc/interrupts | grep gve | grep -v mgmnt | cut -f1 --delimiter=':' > 34 > 35 > 36 > 37 > 38 > 39 > 40 > [...] > 65 > > $ ./tools/net/ynl/cli.py --spec Documentation/netlink/specs/netdev.yaml \ > --dump napi-get --json='{"ifindex": 2}' > [{'id': 8288, 'ifindex': 2, 'irq': 65}, > [...] > {'id': 8263, 'ifindex': 2, 'irq': 40}, > {'id': 8262, 'ifindex': 2, 'irq': 39}, > {'id': 8261, 'ifindex': 2, 'irq': 38}, > {'id': 8260, 'ifindex': 2, 'irq': 37}, > {'id': 8259, 'ifindex': 2, 'irq': 36}, > {'id': 8258, 'ifindex': 2, 'irq': 35}, > {'id': 8257, 'ifindex': 2, 'irq': 34}] > > Signed-off-by: Joe Damato <jdamato@fastly.com> Reviewed-by: Praveen Kaligineedi <pkaligineedi@google.com>
diff --git a/drivers/net/ethernet/google/gve/gve_utils.c b/drivers/net/ethernet/google/gve/gve_utils.c index 2349750075a5..30fef100257e 100644 --- a/drivers/net/ethernet/google/gve/gve_utils.c +++ b/drivers/net/ethernet/google/gve/gve_utils.c @@ -111,6 +111,7 @@ void gve_add_napi(struct gve_priv *priv, int ntfy_idx, struct gve_notify_block *block = &priv->ntfy_blocks[ntfy_idx]; netif_napi_add(priv->dev, &block->napi, gve_poll); + netif_napi_set_irq(&block->napi, block->irq); } void gve_remove_napi(struct gve_priv *priv, int ntfy_idx)
Use netdev-genl interface to map IRQs to NAPI instances so that this information is accessible by user apps via netlink. $ cat /proc/interrupts | grep gve | grep -v mgmnt | cut -f1 --delimiter=':' 34 35 36 37 38 39 40 [...] 65 $ ./tools/net/ynl/cli.py --spec Documentation/netlink/specs/netdev.yaml \ --dump napi-get --json='{"ifindex": 2}' [{'id': 8288, 'ifindex': 2, 'irq': 65}, [...] {'id': 8263, 'ifindex': 2, 'irq': 40}, {'id': 8262, 'ifindex': 2, 'irq': 39}, {'id': 8261, 'ifindex': 2, 'irq': 38}, {'id': 8260, 'ifindex': 2, 'irq': 37}, {'id': 8259, 'ifindex': 2, 'irq': 36}, {'id': 8258, 'ifindex': 2, 'irq': 35}, {'id': 8257, 'ifindex': 2, 'irq': 34}] Signed-off-by: Joe Damato <jdamato@fastly.com> --- v2: - Fix a spelling error in the commit message, pointed out by Simon Horman drivers/net/ethernet/google/gve/gve_utils.c | 1 + 1 file changed, 1 insertion(+)