Skip to content

bpf,net: add missing custom syncookie statistics and add selftest

Jiayuan Chen bpf linux-kselftest lkml netdev 4 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest2 patches 0 repliesNew
  2. v32 patches 0 repliesSuperseded
  3. v22 patches 7 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v11 patch2 repliesSuperseded

v2 -> v3 from the cover letter

- Retarget bpf-next/net (Martin).
- 1/2: fix typo and rationale in commit message — the removed guard is CONFIG_BPF, not CONFIG_BPF_SYSCALL, and the reason is that the guard is a no-op under CONFIG_NET, not a build-failure risk (Martin).
- 2/2: keep reverse xmas tree order in create_connection()

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2net: add missing syncookie statistics for BPF custom syncookiesinclude/net/tcp.h net/ipv4/syncookies.c net/ipv6/syncookies.c+11 -80 replies
2/2selftests/bpf: verify syncookie statistics in tcp_custom_syncookietools/testing/selftests/bpf/network_helpers.c tools/testing/selftests/bpf/network_helpers.h tools/testing/selftests/bpf/prog_tests/tcp_custom_syncookie.c+43 -00 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchKuniyuki Iwashima
1/2R-b
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH bpf-next v4 0/2] bpf,net: add missing custom syncookie statistics and add selftest

v2 was reviewed on net-next; per Martin's request the series is re-targeted at the bpf-next tree's net branch (bpf-next/net) so both patches can land together via the BPF tree (the selftest touches BPF selftest helpers). No code changes vs. v2 beyond the nits below.

For context, the series accounts BPF custom syncookie validation in the LINUX_MIB_SYNCOOKIES{RECV,FAILED} SNMP counters (with a few related cleanups in the cookie_bpf_* config guards), and adds a selftest that verifies the counters move as expected.

v2: https://lore.kernel.org/netdev/[email protected]/T/#m9c0ccc349fbed908e2cf34ce34ebd45b6f747b07

---

Changelog
=========
v3 -> v4: resend it due to auto archive.
v2 -> v3:
- Retarget bpf-next/net (Martin).
- 1/2: fix typo and rationale in commit message — the removed guard is CONFIG_BPF, not CONFIG_BPF_SYSCALL, and the reason is that the guard is a no-op under CONFIG_NET, not a build-failure risk (Martin).
- 2/2: keep reverse xmas tree order in create_connection()

    (Kuniyuki).

- Add Reviewed-by from Kuniyuki on both patches.

Jiayuan Chen (2):
net: add missing syncookie statistics for BPF custom syncookies selftests/bpf: verify syncookie statistics in tcp_custom_syncookie

 include/net/tcp.h                             |  7 +++---
 net/ipv4/syncookies.c                         | 10 ++++++---
 net/ipv6/syncookies.c                         |  2 +-
 tools/testing/selftests/bpf/network_helpers.c | 22 +++++++++++++++++++
 tools/testing/selftests/bpf/network_helpers.h |  1 +
 .../bpf/prog_tests/tcp_custom_syncookie.c     | 20 +++++++++++++++++
 6 files changed, 54 insertions(+), 8 deletions(-)
Signature · 1 line
2.43.0