public inbox for bpf@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 bpf-next 0/4] flow_dissector: Allow bpf flow-dissector progs to request fallback to normal dissection
@ 2022-08-21 11:35 Shmulik Ladkani
  2022-08-21 11:35 ` [PATCH v2 bpf-next 1/4] flow_dissector: Make 'bpf_flow_dissect' return the bpf program retcode Shmulik Ladkani
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Shmulik Ladkani @ 2022-08-21 11:35 UTC (permalink / raw)
  To: bpf, Alexei Starovoitov, Stanislav Fomichev
  Cc: Jakub Sitnicki, Petar Penkov, Willem de Bruijn, Shmulik Ladkani

Currently, attaching BPF_PROG_TYPE_FLOW_DISSECTOR programs completely
replaces the flow-dissector logic with custom dissection logic.
This forces implementors to write programs that handle dissection for
any flows expected in the namespace.

It makes sense for flow-dissector bpf programs to just augment the
dissector with custom logic (e.g. dissecting certain flows or custom
protocols), while enjoying the broad capabilities of the standard
dissector for any other traffic.

v2:
- Extend selftests/bpf/progs/bpf_flow.c to exercise new ret code

Shmulik Ladkani (4):
  flow_dissector: Make 'bpf_flow_dissect' return the bpf program retcode
  bpf/flow_dissector: Introduce BPF_FLOW_DISSECTOR_CONTINUE retcode for
    flow-dissector bpf progs
  bpf: test_run: Propagate bpf_flow_dissect's retval to user's
    bpf_attr.test.retval
  selftests/bpf: test BPF_FLOW_DISSECTOR_CONTINUE

 include/linux/skbuff.h                        |  4 +-
 include/uapi/linux/bpf.h                      |  5 +++
 net/core/flow_dissector.c                     | 16 ++++---
 tools/include/uapi/linux/bpf.h                |  5 +++
 .../selftests/bpf/prog_tests/flow_dissector.c | 44 ++++++++++++++++++-
 .../prog_tests/flow_dissector_load_bytes.c    |  2 +-
 tools/testing/selftests/bpf/progs/bpf_flow.c  | 15 +++++++
 .../selftests/bpf/test_flow_dissector.sh      |  8 ++++
 8 files changed, 89 insertions(+), 10 deletions(-)

-- 
2.37.2


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

end of thread, other threads:[~2022-08-23 20:52 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-21 11:35 [PATCH v2 bpf-next 0/4] flow_dissector: Allow bpf flow-dissector progs to request fallback to normal dissection Shmulik Ladkani
2022-08-21 11:35 ` [PATCH v2 bpf-next 1/4] flow_dissector: Make 'bpf_flow_dissect' return the bpf program retcode Shmulik Ladkani
2022-08-21 11:35 ` [PATCH v2 bpf-next 2/4] bpf/flow_dissector: Introduce BPF_FLOW_DISSECTOR_CONTINUE retcode for flow-dissector bpf progs Shmulik Ladkani
2022-08-21 11:35 ` [PATCH v2 bpf-next 3/4] bpf: test_run: Propagate bpf_flow_dissect's retval to user's bpf_attr.test.retval Shmulik Ladkani
2022-08-21 11:35 ` [PATCH v2 bpf-next 4/4] selftests/bpf: test BPF_FLOW_DISSECTOR_CONTINUE Shmulik Ladkani
2022-08-22 18:06 ` [PATCH v2 bpf-next 0/4] flow_dissector: Allow bpf flow-dissector progs to request fallback to normal dissection Stanislav Fomichev
2022-08-23  7:38 ` John Fastabend
2022-08-23 20:50 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox