netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH bpf-next 0/4] bpf: A fix and a change to bpf_fib_lookup
@ 2023-02-17  0:41 Martin KaFai Lau
  2023-02-17  0:41 ` [PATCH bpf-next 1/4] bpf: Disable bh in bpf_test_run for xdp and tc prog Martin KaFai Lau
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Martin KaFai Lau @ 2023-02-17  0:41 UTC (permalink / raw)
  To: bpf
  Cc: 'Alexei Starovoitov ', 'Andrii Nakryiko ',
	'Daniel Borkmann ', netdev, kernel-team

From: Martin KaFai Lau <martin.lau@kernel.org>

This set fixes the bpf_fib_lookup such that it won't return
a NUD_FAILED neigh which may have invalid dmac. It also
adds a SKIP_NEIGH lookup flag to have bpf_fib_lookup skipping
the neigh lookup.

Please see individual patch for details.

Martin KaFai Lau (4):
  bpf: Disable bh in bpf_test_run for xdp and tc prog
  bpf: bpf_fib_lookup should not return neigh in NUD_FAILED state
  bpf: Add BPF_FIB_LOOKUP_SKIP_NEIGH for bpf_fib_lookup
  selftests/bpf: Add bpf_fib_lookup test

 include/uapi/linux/bpf.h                      |   1 +
 net/bpf/test_run.c                            |   2 +
 net/core/filter.c                             |  37 ++--
 tools/include/uapi/linux/bpf.h                |   1 +
 .../selftests/bpf/prog_tests/fib_lookup.c     | 187 ++++++++++++++++++
 .../testing/selftests/bpf/progs/fib_lookup.c  |  22 +++
 6 files changed, 238 insertions(+), 12 deletions(-)
 create mode 100644 tools/testing/selftests/bpf/prog_tests/fib_lookup.c
 create mode 100644 tools/testing/selftests/bpf/progs/fib_lookup.c

-- 
2.30.2


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

end of thread, other threads:[~2023-02-17 23:08 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-17  0:41 [PATCH bpf-next 0/4] bpf: A fix and a change to bpf_fib_lookup Martin KaFai Lau
2023-02-17  0:41 ` [PATCH bpf-next 1/4] bpf: Disable bh in bpf_test_run for xdp and tc prog Martin KaFai Lau
2023-02-17  0:41 ` [PATCH bpf-next 2/4] bpf: bpf_fib_lookup should not return neigh in NUD_FAILED state Martin KaFai Lau
2023-02-17  0:41 ` [PATCH bpf-next 3/4] bpf: Add BPF_FIB_LOOKUP_SKIP_NEIGH for bpf_fib_lookup Martin KaFai Lau
2023-02-17 16:00   ` Daniel Borkmann
2023-02-17 17:13     ` Martin KaFai Lau
2023-02-17  0:41 ` [PATCH bpf-next 4/4] selftests/bpf: Add bpf_fib_lookup test Martin KaFai Lau
2023-02-17 23:02   ` Andrii Nakryiko
2023-02-17 23:08     ` Martin KaFai Lau

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