Skip to content

netdev-genl: Add an xsk attribute to queues

Joe Damato bpf linux-kselftest lkml netdev 10 versions – Applied

Status from this message: This series was applied to netdev/net-next.git (main)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v8 Latest3 patches 0 repliesApplied 3/3
  2. v7 posting 3/33 patches 1 replySuperseded
  3. v7 posting 2/30 of 3 patches 0 repliesSuperseded
Earlier versions · 7
VersionPostedPatchesRepliesStatus
v7 posting 1/33 patches0 repliesSuperseded
v63 patches8 repliesSuperseded
v53 patches4 repliesSuperseded
v43 patches2 repliesSuperseded
v32 patches4 repliesSuperseded
v22 patches1 replySuperseded
v1 RFC2 patches7 repliesSuperseded

Changes in v8 from the cover letter

- Update the Makefile in patch 3 to use TEST_GEN_FILES instead of TEST_GET_PROGS.
- Fix a codespell complaint in xdp_helper.c.

Patches in v8 All 3 applied

#Subject and filesSizeRepliesApplied
1/3netlink: Add nla_put_empty_nest helperinclude/net/netlink.h+15 -00 repliesApplied
2/3netdev-genl: Add an XSK attribute to queuesDocumentation/netlink/specs/netdev.yaml include/uapi/linux/netdev.h net/core/netdev-genl.c +1 more+36 -10 repliesApplied
3/3selftests: drv-net: Test queue xsk attributetools/testing/selftests/drivers/net/.gitignore tools/testing/selftests/drivers/net/Makefile tools/testing/selftests/drivers/net/config +2 more+143 -30 repliesApplied

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v8 yet.

Read the v8 thread

Cover letter [PATCH net-next v8 0/3] netdev-genl: Add an xsk attribute to queues

Greetings:

Welcome to v8. Minor change, see changelog below. Re-tested on my mlx5 system both with and without CONFIG_XDP_SOCKETS enabled and both with and without NETIF set.

This is an attempt to followup on something Jakub asked me about [1], adding an xsk attribute to queues and more clearly documenting which queues are linked to NAPIs...

After the RFC [2], Jakub suggested creating an empty nest for queues which have a pool, so I've adjusted this version to work that way.

The nest can be extended in the future to express attributes about XSK as needed. Queues which are not used for AF_XDP do not have the xsk attribute present.

I've run the included test on:
- my mlx5 machine (via NETIF=)
- without setting NETIF

And the test seems to pass in both cases.

Thanks,
Joe

[1]: https://lore.kernel.org/netdev/[email protected]/
[2]: https://lore.kernel.org/netdev/[email protected]/

v8:
- Update the Makefile in patch 3 to use TEST_GEN_FILES instead of TEST_GET_PROGS.
- Fix a codespell complaint in xdp_helper.c.

v7: https://lore.kernel.org/netdev/[email protected]/
- Added CONFIG_XDP_SOCKETS to selftests/driver/net/config as suggested by Stanislav.
- Updated xdp_helper.c to return -1 for AF_XDP non-existence, but 1 for other failures.
- Updated queues.py to mark test as skipped if AF_XDP does not exist.

v6: https://lore.kernel.org/bpf/[email protected]/
- Added ifdefs for CONFIG_XDP_SOCKETS in patch 2 as Stanislav suggested.

v5: https://lore.kernel.org/bpf/[email protected]/
- Removed unused ret variable from patch 2 as Simon suggested.

v4: https://lore.kernel.org/lkml/[email protected]/
- Add patch 1, as suggested by Jakub, which adds an empty nest helper.
- Use the helper in patch 2, which makes the code cleaner and prevents a possible bug.

v3: https://lore.kernel.org/netdev/[email protected]/
- Change comment format in patch 2 to avoid kdoc warnings. No other changes.

v2: https://lore.kernel.org/all/[email protected]/
- Switched from RFC to actual submission now that net-next is open
- Adjusted patch 1 to include an empty nest as suggested by Jakub
- Adjusted patch 2 to update the test based on changes to patch 1, and to incorporate some Python feedback from Jakub :)

rfc: https://lore.kernel.org/netdev/[email protected]/

Joe Damato (3):
netlink: Add nla_put_empty_nest helper
netdev-genl: Add an XSK attribute to queues
selftests: drv-net: Test queue xsk attribute

 Documentation/netlink/specs/netdev.yaml       | 13 ++-
 include/net/netlink.h                         | 15 +++
 include/uapi/linux/netdev.h                   |  6 ++
 net/core/netdev-genl.c                        | 12 +++
 tools/include/uapi/linux/netdev.h             |  6 ++
 .../testing/selftests/drivers/net/.gitignore  |  2 +
 tools/testing/selftests/drivers/net/Makefile  |  3 +
 tools/testing/selftests/drivers/net/config    |  1 +
 tools/testing/selftests/drivers/net/queues.py | 42 +++++++-
 .../selftests/drivers/net/xdp_helper.c        | 98 +++++++++++++++++++
 10 files changed, 194 insertions(+), 4 deletions(-)
 create mode 100644 tools/testing/selftests/drivers/net/.gitignore
 create mode 100644 tools/testing/selftests/drivers/net/xdp_helper.c

base-commit: 7a7e0197133d18cfd9931e7d3a842d0f5730223f

Signature · 1 line
2.43.0