Skip to content

Better handling of xskmap entries

Jonathan Lemon netdev 5 versions – Applied

Status from this message: Applied. Thanks

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest4 patches 4 repliesApplied
  2. v42 patches 10 repliesSuperseded
  3. v32 patches 5 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v22 patches5 repliesSuperseded
v12 patches4 repliesSuperseded

Changes in v5 from the cover letter

- xskmap lookup now returns XDP_SOCK type instead of pointer to element.
- no changes lib/bpf/xsk.c

Patches in v5 Applied

#Subject and filesSizeRepliesApplied
1/4bpf: Allow bpf_map_lookup_elem() on an xskmapinclude/linux/bpf.h include/net/xdp_sock.h include/uapi/linux/bpf.h +4 more+85 -190 replies
2/4bpf/tools: sync bpf.htools/include/uapi/linux/bpf.h+4 -01 reply
3/4tools/bpf: Add bpf_map_lookup_elem selftest for xskmaptools/testing/selftests/bpf/verifier/sock.c+18 -01 reply
4/4libbpf: remove qidconf and better support external bpf programs.tools/lib/bpf/xsk.c+28 -750 replies

Reviews trailers per patch

All 4 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchMartin KaFai LauSong LiuBjörn Töpel
SeriesA-b
1/4A-b
2/4A-b
3/4A-b
4/4A-b T-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v5 thread

Cover letter [PATCH v5 bpf-next 0/4] Better handling of xskmap entries

Currently, the AF_XDP code uses a separate map in order to determine if an xsk is bound to a queue. Have the xskmap lookup return a XDP_SOCK pointer on the kernel side, which the verifier uses to extract relevant values.

Patches:
1 - adds XSK_SOCK type
2 - sync bpf.h with tools
3 - add tools selftest
4 - update lib/bpf, removing qidconf

v4->v5:
- xskmap lookup now returns XDP_SOCK type instead of pointer to element.
- no changes lib/bpf/xsk.c

v3->v4:
- Clarify error handling path.

v2->v3:
- Use correct map type.

Jonathan Lemon (4):
bpf: Allow bpf_map_lookup_elem() on an xskmap bpf/tools: sync bpf.h
tools/bpf: Add bpf_map_lookup_elem selftest for xskmap
libbpf: remove qidconf and better support external bpf programs.

 include/linux/bpf.h                           |   8 ++
 include/net/xdp_sock.h                        |   4 +-
 include/uapi/linux/bpf.h                      |   4 +
 kernel/bpf/verifier.c                         |  26 ++++-
 kernel/bpf/xskmap.c                           |   7 ++
 net/core/filter.c                             |  40 +++++++
 tools/include/uapi/linux/bpf.h                |   4 +
 tools/lib/bpf/xsk.c                           | 103 +++++-------------
 .../bpf/verifier/prevent_map_lookup.c         |  15 ---
 tools/testing/selftests/bpf/verifier/sock.c   |  18 +++
 10 files changed, 135 insertions(+), 94 deletions(-)
Signature · 1 line
2.17.1