bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH bpf-next 0/2] Get ifindex in BPF_SK_LOOKUP prog type
@ 2021-10-15 11:23 Mark Pashmfouroush
  2021-10-15 11:23 ` [PATCH bpf-next 1/2] bpf: Add ifindex to bpf_sk_lookup Mark Pashmfouroush
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Mark Pashmfouroush @ 2021-10-15 11:23 UTC (permalink / raw)
  To: markpash
  Cc: Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko,
	Martin KaFai Lau, Song Liu, Yonghong Song, John Fastabend,
	KP Singh, David S. Miller, Jakub Kicinski, Hideaki YOSHIFUJI,
	David Ahern, Shuah Khan, Brendan Jackman, Florent Revest,
	Joe Stringer, Jesper Dangaard Brouer,
	Toke Høiland-Jørgensen, Lorenz Bauer, Dave Marchevsky,
	Björn Töpel, Luke Nelson, netdev, bpf, linux-kernel,
	linux-kselftest

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.

Mark Pashmfouroush (2):
  bpf: Add ifindex to bpf_sk_lookup
  selftests/bpf: Add tests for accessing 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(-)

-- 
2.31.1


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

end of thread, other threads:[~2021-10-21 19:09 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-15 11:23 [PATCH bpf-next 0/2] Get ifindex in BPF_SK_LOOKUP prog type Mark Pashmfouroush
2021-10-15 11:23 ` [PATCH bpf-next 1/2] bpf: Add ifindex to bpf_sk_lookup Mark Pashmfouroush
2021-10-21  1:39   ` Alexei Starovoitov
2021-10-21 19:07     ` John Fastabend
2021-10-21 19:00   ` John Fastabend
2021-10-15 11:23 ` [PATCH bpf-next 2/2] selftests/bpf: Add tests for accessing ifindex in bpf_sk_lookup Mark Pashmfouroush
2021-10-21 19:09   ` John Fastabend
2021-10-15 14:17 ` [PATCH bpf-next 0/2] Get ifindex in BPF_SK_LOOKUP prog type Lorenz Bauer

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).