Skip to content

gtp: ynl spec for the GTP netlink family, two fixes, and a selftest

Anil Kaushik linux-kselftest lkml netdev 6 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. v7 Latest4 patches 0 repliesApplied 4/4
  2. v63 patches 0 repliesSuperseded
  3. v53 patches 0 repliesSuperseded
Earlier versions · 3
VersionPostedPatchesRepliesStatus
v43 patches0 repliesSuperseded
v33 patches1 replySuperseded
v23 patches1 replySuperseded

Changes in v7 from the cover letter

- new patch 2: fix the RCU warning the selftest found on debug kernels
- selftest: add a docstring to GtpFamily (pylint)
- Cc Stanislav for lib/py

Patches in v7 All 4 applied

#Subject and filesSizeRepliesApplied
1/4gtp: set a valid genl command in PDP context get and dump repliesdrivers/net/gtp.c+2 -20 repliesApplied
2/4gtp: hold RCU for the device lookup when adding a PDP contextdrivers/net/gtp.c+3 -00 repliesApplied
3/4netlink: specs: add genetlink-legacy spec for GTPDocumentation/netlink/specs/gtp.yaml MAINTAINERS tools/net/ynl/Makefile.deps+198 -00 repliesApplied
4/4selftests: net: add a test for the gtp netlink familyMAINTAINERS tools/testing/selftests/net/Makefile tools/testing/selftests/net/config +3 more+137 -30 repliesApplied

Reviews trailers per patch

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

Read the v7 thread

Cover letter [PATCH net-next v7 0/4] gtp: ynl spec for the GTP netlink family, two fixes, and a selftest

This adds a ynl spec for the gtp genetlink family, two small driver fixes, and a selftest.

Patch 1: the GET and dump replies carried the family id in the command field, so ynl dropped them. Use GTP_CMD_GETPDP instead. Patch 2: new in v7. On the netdev CI debug kernel, the selftest hit an RCU warning: adding a PDP context looks up the device without the RCU read lock. Hold it around the lookup.
Patch 3: the spec (NEWPDP/DELPDP/GETPDP/ECHOREQ), no uapi change. Patch 4: a selftest that adds, dumps and deletes PDP contexts.

The multicast notifications are not in the spec: they reuse the request command values, which the ynl C generator can't express with the current uapi header.

v7:
- new patch 2: fix the RCU warning the selftest found on debug kernels
- selftest: add a docstring to GtpFamily (pylint)
- Cc Stanislav for lib/py
v6:
- spec: use the gtp_version uapi enum for the version attribute
- spec: family only applies to the MS address, fix its doc
- selftest: also skip on "Unknown device type", printed by iproute2 with extack support when the kernel has no gtp
v5:
- ynl: add CFLAGS_gtp so the generated code builds with older headers
- spec: doc fixes, min-len for the IPv6 attributes
- selftest: only skip when GTP is unavailable, close the ynl handle
v4:
- spec: request/reply attributes now match the handlers
- selftest: fix the gtp.ko autoload crash, check ENOENT, delete by TEI and by MS address

v6: https://lore.kernel.org/netdev/[email protected]/
v5: https://lore.kernel.org/netdev/[email protected]/
v4: https://lore.kernel.org/netdev/[email protected]/
v3: https://lore.kernel.org/netdev/[email protected]/
v2: https://lore.kernel.org/netdev/[email protected]/

Anil Kaushik (4):
gtp: set a valid genl command in PDP context get and dump replies
gtp: hold RCU for the device lookup when adding a PDP context
netlink: specs: add genetlink-legacy spec for GTP
selftests: net: add a test for the gtp netlink family

 Documentation/netlink/specs/gtp.yaml          | 196 ++++++++++++++++++
 MAINTAINERS                                   |   2 +
 drivers/net/gtp.c                             |   7 +-
 tools/net/ynl/Makefile.deps                   |   1 +
 tools/testing/selftests/net/Makefile          |   1 +
 tools/testing/selftests/net/config            |   1 +
 tools/testing/selftests/net/gtp.py            | 123 +++++++++++
 .../testing/selftests/net/lib/py/__init__.py  |   5 +-
 tools/testing/selftests/net/lib/py/ynl.py     |   9 +-
 9 files changed, 340 insertions(+), 5 deletions(-)
 create mode 100644 Documentation/netlink/specs/gtp.yaml
 create mode 100755 tools/testing/selftests/net/gtp.py
Signature · 1 line
2.25.1