Skip to content

Get ingress_ifindex in BPF_SK_LOOKUP prog type

Mark Pashmfouroush bpf linux-kselftest lkml netdev 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest2 patches 1 replyIn review
  2. v22 patches 2 repliesSuperseded
  3. v12 patches 5 repliesSuperseded

Changes in v3 from the cover letter

- Rename ifindex field to ingress_ifindex for consistency. (Yonghong)

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2bpf: Add ingress_ifindex to bpf_sk_lookupinclude/linux/filter.h include/uapi/linux/bpf.h net/core/filter.c +5 more+30 -180 replies
2/2selftests/bpf: Add tests for accessing ingress_ifindex in bpf_sk_lookuptools/testing/selftests/bpf/prog_tests/sk_lookup.c tools/testing/selftests/bpf/progs/test_sk_lookup.c tools/testing/selftests/bpf/verifier/ctx_sk_lookup.c+71 -00 replies

Reviews trailers per patch

None of the 2 patches has a Reviewed-by or Acked-by.

PatchLorenz Bauer
SeriesRevieview-by
1/2
2/2

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

Read the v3 thread

Cover letter [PATCH bpf-next v3 0/2] Get ingress_ifindex in BPF_SK_LOOKUP prog type

BPF_SK_LOOKUP users may want to have access to the ifindex of the skb which triggered the socket lookup. This may be useful for selectively applying programmable socket lookup logic to packets that arrive on a specific interface, or excluding packets from an interface.

v3:
- Rename ifindex field to ingress_ifindex for consistency. (Yonghong)

v2:
- Fix inaccurate comment (Alexei)
- Add more details to commit messages (John)

Mark Pashmfouroush (2):
bpf: Add ingress_ifindex to bpf_sk_lookup selftests/bpf: Add tests for accessing ingress_ifindex in
bpf_sk_lookup

 include/linux/filter.h                        |  7 ++--
 include/uapi/linux/bpf.h                      |  1 +
 net/core/filter.c                             |  7 ++++
 net/ipv4/inet_hashtables.c                    |  8 ++---
 net/ipv4/udp.c                                |  8 ++---
 net/ipv6/inet6_hashtables.c                   |  8 ++---
 net/ipv6/udp.c                                |  8 ++---
 tools/include/uapi/linux/bpf.h                |  1 +
 .../selftests/bpf/prog_tests/sk_lookup.c      | 31 ++++++++++++++++++
 .../selftests/bpf/progs/test_sk_lookup.c      |  8 +++++
 .../selftests/bpf/verifier/ctx_sk_lookup.c    | 32 +++++++++++++++++++
 11 files changed, 101 insertions(+), 18 deletions(-)
Signature · 1 line
2.31.1