mbox series

[net-next/RFC,v1,0/4] Introduce napi queues support

Message ID 168564116688.7284.6877238631049679250.stgit@anambiarhost.jf.intel.com (mailing list archive)
Headers show
Series Introduce napi queues support | expand

Message

Nambiar, Amritha June 1, 2023, 5:42 p.m. UTC
Introduce support for associating napi instances with
corresponding RX and TX queue set. Add the capability
to export napi information supported by the device.
Extend the netdev_genl generic netlink family for netdev
with napi data. The napi fields exposed are:
- napi id
- queue/queue-set (both RX and TX) associated with each
  napi instance

Additional napi fields such as PID association for napi
thread etc. can be supported in a follow-on patch set.

This series only supports 'get' ability for retrieving
napi fields (specifically, napi ids and queue[s]). The 'set'
ability for setting queue[s] associated with a napi instance
via netdev-genl will be submitted as a separate patch series.

Previous discussion at:
https://lore.kernel.org/netdev/c8476530638a5f4381d64db0e024ed49c2db3b02.camel@gmail.com/T/#m00999652a8b4731fbdb7bf698d2e3666c65a60e7

$ ./cli.py --spec netdev.yaml  --do dev-get --json='{"ifindex": 12}'
[{'ifindex': 12,
  'xdp-features': {'xsk-zerocopy', 'basic', 'rx-sg', 'redirect'}},
 {'napi-info': [{'napi-id': 600, 'rx-queues': [7], 'tx-queues': [7]},
                {'napi-id': 599, 'rx-queues': [6], 'tx-queues': [6]},
                {'napi-id': 598, 'rx-queues': [5], 'tx-queues': [5]},
                {'napi-id': 597, 'rx-queues': [4], 'tx-queues': [4]},
                {'napi-id': 596, 'rx-queues': [3], 'tx-queues': [3]},
                {'napi-id': 595, 'rx-queues': [2], 'tx-queues': [2]},
                {'napi-id': 594, 'rx-queues': [1], 'tx-queues': [1]},
                {'napi-id': 593, 'rx-queues': [0], 'tx-queues': [0]}]}]

---

Amritha Nambiar (4):
      net: Introduce new napi fields for rx/tx queues
      net: Add support for associating napi with queue[s]
      netdev-genl: Introduce netdev dump ctx
      netdev-genl: Add support for exposing napi info from netdev


 Documentation/netlink/specs/netdev.yaml   |   39 ++++
 drivers/net/ethernet/intel/ice/ice_lib.c  |   57 ++++++
 drivers/net/ethernet/intel/ice/ice_lib.h  |    4 
 drivers/net/ethernet/intel/ice/ice_main.c |    4 
 include/linux/netdevice.h                 |   18 ++
 include/uapi/linux/netdev.h               |    4 
 net/core/dev.c                            |   55 ++++++
 net/core/netdev-genl.c                    |  261 ++++++++++++++++++++++++-----
 tools/include/uapi/linux/netdev.h         |    4 
 9 files changed, 402 insertions(+), 44 deletions(-)

--

Comments

Jakub Kicinski June 3, 2023, 6 a.m. UTC | #1
On Thu, 01 Jun 2023 10:42:20 -0700 Amritha Nambiar wrote:
> Introduce support for associating napi instances with
> corresponding RX and TX queue set. Add the capability
> to export napi information supported by the device.
> Extend the netdev_genl generic netlink family for netdev
> with napi data. The napi fields exposed are:
> - napi id
> - queue/queue-set (both RX and TX) associated with each
>   napi instance

Would you mind throwing in the IRQ vector number already?
Should be pretty easy to find the IRQ from NAPI, and it'd
make this code immediately very useful for IRQ pinning.

> Additional napi fields such as PID association for napi
> thread etc. can be supported in a follow-on patch set.
> 
> This series only supports 'get' ability for retrieving
> napi fields (specifically, napi ids and queue[s]). The 'set'
> ability for setting queue[s] associated with a napi instance
> via netdev-genl will be submitted as a separate patch series.
Nambiar, Amritha July 12, 2023, 7:52 p.m. UTC | #2
On 6/2/2023 11:00 PM, Jakub Kicinski wrote:
> On Thu, 01 Jun 2023 10:42:20 -0700 Amritha Nambiar wrote:
>> Introduce support for associating napi instances with
>> corresponding RX and TX queue set. Add the capability
>> to export napi information supported by the device.
>> Extend the netdev_genl generic netlink family for netdev
>> with napi data. The napi fields exposed are:
>> - napi id
>> - queue/queue-set (both RX and TX) associated with each
>>    napi instance
> 
> Would you mind throwing in the IRQ vector number already?
> Should be pretty easy to find the IRQ from NAPI, and it'd
> make this code immediately very useful for IRQ pinning.
> 

Sorry for the delayed response as I was on vacation.
Sure, I can add in the IRQ vector number as well in the next version of 
the series.

>> Additional napi fields such as PID association for napi
>> thread etc. can be supported in a follow-on patch set.
>>
>> This series only supports 'get' ability for retrieving
>> napi fields (specifically, napi ids and queue[s]). The 'set'
>> ability for setting queue[s] associated with a napi instance
>> via netdev-genl will be submitted as a separate patch series.