This respins the RFC "netlink: specs: add genetlink-legacy spec for GTP"
(netdev, 2026-10-01) as a patch, and adds a driver fix the spec exposed
plus a selftest that uses it.
While writing a ynl-based selftest for the existing gtp family I found
that the GET and dump replies put the genl family id in the command
field instead of a GTP_CMD_* value. libgtpnl ignores the command so it
never mattered, but ynl rejects the reply as an unknown command and
drops it. Patch 1 fixes the driver; patches 2 and 3 then describe and
test the family.
The turnaround on the respin was slower than I would have liked: most
of the time went into pinning down the reply-command bug in patch 1
once the selftest surfaced it.
Patch 1 sets a valid command (GTP_CMD_GETPDP) in the get and dump
replies.
Patch 2 adds a genetlink-legacy ynl spec for the gtp family
(NEWPDP/DELPDP/GETPDP/ECHOREQ). Description only, no uapi change.
Patch 3 adds a selftest built on the spec: it creates a gtp device, adds
a PDP context with newpdp, checks getpdp lists it and delpdp removes it.
It skips when the kernel or iproute2 lack GTP support.
The 5G PDU Session Container / QFI work that first motivated the spec is
not part of this series; I have no mainline userspace consumer for it (my
5G user plane uses an OVS datapath, not the kernel gtp driver), so per the
discussion with Harald Welte it is parked.
Anil Kaushik (3):
gtp: set a valid genl command in PDP context get and dump replies
netlink: specs: add genetlink-legacy spec for GTP
selftests: net: add a test for the gtp netlink family
Documentation/netlink/specs/gtp.yaml | 170 ++++++++++++++++++
MAINTAINERS | 2 +
drivers/net/gtp.c | 4 +-
tools/testing/selftests/net/Makefile | 1 +
tools/testing/selftests/net/gtp.py | 77 ++++++++
.../testing/selftests/net/lib/py/__init__.py | 5 +-
tools/testing/selftests/net/lib/py/ynl.py | 8 +-
7 files changed, 262 insertions(+), 5 deletions(-)
create mode 100644 Documentation/netlink/specs/gtp.yaml
create mode 100644 tools/testing/selftests/net/gtp.py
--
2.25.1