Skip to content

bpf: expose information about netdev xdp-metadata kfunc support

Stanislav Fomichev bpf netdev 2 versions – Applied

Status from this message: This series was applied to bpf/bpf-next.git (master)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 0 repliesApplied 3/3
  2. v13 patches 2 repliesSuperseded

Changes in v2 from the cover letter

- add netdev->xdp_metadata_ops NULL check when dumping to netlink (Martin)

Patches in v2 All 3 applied

#Subject and filesSizeRepliesApplied
1/3bpf: make it easier to add new metadata kfuncinclude/net/xdp.h kernel/bpf/offload.c net/core/xdp.c+19 -100 repliesApplied
2/3bpf: expose information about supported xdp metadata kfuncDocumentation/netlink/specs/netdev.yaml Documentation/networking/xdp-rx-metadata.rst include/net/xdp.h +5 more+78 -50 repliesApplied
3/3tools: ynl: extend netdev sample to dump xdp-rx-metadata-featurestools/net/ynl/generated/netdev-user.c tools/net/ynl/generated/netdev-user.h tools/net/ynl/samples/Makefile +1 more+30 -20 repliesApplied

Reviews trailers per patch

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

Read the v2 thread

Cover letter [PATCH bpf-next v2 0/3] bpf: expose information about netdev xdp-metadata kfunc support

Extend netdev netlink family to expose the bitmask with the kfuncs that the device implements. The source of truth is the device's xdp_metadata_ops. There is some amount of auto-generated netlink boilerplate; the change itself is super minimal.

v2:
- add netdev->xdp_metadata_ops NULL check when dumping to netlink (Martin)

Cc Willem de Bruijn <[email protected]>

Stanislav Fomichev (3):
bpf: make it easier to add new metadata kfunc
bpf: expose information about supported xdp metadata kfunc
tools: ynl: extend netdev sample to dump xdp-rx-metadata-features

 Documentation/netlink/specs/netdev.yaml      | 21 ++++++++++++++++++++
 Documentation/networking/xdp-rx-metadata.rst |  7 +++++++
 include/net/xdp.h                            | 19 ++++++++++++++----
 include/uapi/linux/netdev.h                  | 16 +++++++++++++++
 kernel/bpf/offload.c                         |  9 +++++----
 net/core/netdev-genl.c                       | 12 ++++++++++-
 net/core/xdp.c                               |  4 ++--
 tools/include/uapi/linux/netdev.h            | 16 +++++++++++++++
 tools/net/ynl/generated/netdev-user.c        | 19 ++++++++++++++++++
 tools/net/ynl/generated/netdev-user.h        |  3 +++
 tools/net/ynl/samples/Makefile               |  2 +-
 tools/net/ynl/samples/netdev.c               |  8 +++++++-
 12 files changed, 123 insertions(+), 13 deletions(-)
Signature · 1 line
2.42.0.283.g2d96d420d3-goog