netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v3 0/3] gtp: ynl spec for the GTP netlink family, a reply-command fix, and a selftest
@ 2026-10-09  6:06 Anil Kaushik
  2026-10-09  6:06 ` [PATCH net-next v3 1/3] gtp: set a valid genl command in PDP context get and dump replies Anil Kaushik
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Anil Kaushik @ 2026-10-09  6:06 UTC (permalink / raw)
  To: Pablo Neira Ayuso, Harald Welte, Donald Hunter, Jakub Kicinski,
	David S. Miller, Eric Dumazet, Paolo Abeni, Simon Horman,
	Andrew Lunn, Shuah Khan
  Cc: osmocom-net-gprs, netdev, linux-kernel, linux-kselftest

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.

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.

Changes since v2:
 - selftest: add CONFIG_GTP to tools/testing/selftests/net/config
   (kept in sorted order).
 - selftest: move gtp.py to its correct alphabetical slot in the net
   Makefile (after the gre_* entries) and mark the script executable.
 - selftest: add docstrings to the three test functions and main();
   ruff check is clean under tools/testing/selftests/net/ruff.toml.
 - selftest: move GtpFamily before PSPFamily in lib/py (import and
   __all__).
 - Patches 1 and 2 are unchanged from v2.

v2: https://lore.kernel.org/netdev/20261008181031.4129029-1-anilkaushikwireless@gmail.com/

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/config            |   1 +
 tools/testing/selftests/net/gtp.py            |  85 +++++++++
 .../testing/selftests/net/lib/py/__init__.py  |   5 +-
 tools/testing/selftests/net/lib/py/ynl.py     |   8 +-
 8 files changed, 271 insertions(+), 5 deletions(-)
 create mode 100644 Documentation/netlink/specs/gtp.yaml
 create mode 100755 tools/testing/selftests/net/gtp.py

-- 
2.25.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-10-10 10:56 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-09  6:06 [PATCH net-next v3 0/3] gtp: ynl spec for the GTP netlink family, a reply-command fix, and a selftest Anil Kaushik
2026-10-09  6:06 ` [PATCH net-next v3 1/3] gtp: set a valid genl command in PDP context get and dump replies Anil Kaushik
2026-10-09  6:06 ` [PATCH net-next v3 2/3] netlink: specs: add genetlink-legacy spec for GTP Anil Kaushik
2026-10-10  6:21   ` netdev-bot+sashiko
2026-10-09  6:06 ` [PATCH net-next v3 3/3] selftests: net: add a test for the gtp netlink family Anil Kaushik
2026-10-10  6:21   ` netdev-bot+sashiko
2026-10-10 10:56     ` Anil Kaushik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).