bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [bpf-next PATCH 0/4] bpf, sockmap: allow verdict only sk_skb progs
@ 2020-10-11  5:08 John Fastabend
  2020-10-11  5:09 ` [bpf-next PATCH 1/4] bpf, sockmap: check skb_verdict and skb_parser programs explicitly John Fastabend
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: John Fastabend @ 2020-10-11  5:08 UTC (permalink / raw)
  To: john.fastabend, alexei.starovoitov, daniel; +Cc: netdev, bpf, jakub, lmb

This allows a sockmap sk_skb verdict programs to run without a parser. For
some use cases, such as verdict program that support streaming data or a
l3/l4 proxy that does not use data in packet, loading the nop parser
'return skb->len' is an extra unnecessary complexity. With this series we
simply call the verdict program directly from data_ready instead of
bouncing through the strparser logic.

Patches 1,2 do the lifting on the sockmap side then patches 3,4 add the
selftests.

This applies on top of the series here,

  sockmap/sk_skb program memory acct fixes 
  https://patchwork.ozlabs.org/project/netdev/list/?series=206975

it will apply without the above series cleanly, but will have an incorrect
memory accounting causing a failure in ./test_sockmap. I could have left
it so the series passed without above series, but it seemed odd to have
it out there and then require yet another patch to fix it up here.

Thanks.

---

John Fastabend (4):
      bpf, sockmap: check skb_verdict and skb_parser programs explicitly
      bpf, sockmap: Allow skipping sk_skb parser program
      bpf, selftests: Add option to test_sockmap to omit adding parser program
      bpf, selftests: Add three new sockmap tests for verdict only programs


 include/linux/skmsg.h                      |    2 +
 net/core/skmsg.c                           |   78 ++++++++++++++++++++++++++++
 net/core/sock_map.c                        |   37 ++++++++-----
 tools/testing/selftests/bpf/test_sockmap.c |   54 ++++++++++++++-----
 4 files changed, 142 insertions(+), 29 deletions(-)

--
Signature

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

end of thread, other threads:[~2020-10-16  8:12 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-11  5:08 [bpf-next PATCH 0/4] bpf, sockmap: allow verdict only sk_skb progs John Fastabend
2020-10-11  5:09 ` [bpf-next PATCH 1/4] bpf, sockmap: check skb_verdict and skb_parser programs explicitly John Fastabend
2020-10-11  5:09 ` [bpf-next PATCH 2/4] bpf, sockmap: Allow skipping sk_skb parser program John Fastabend
2020-10-11  5:10 ` [bpf-next PATCH 3/4] bpf, selftests: Add option to test_sockmap to omit adding " John Fastabend
2020-10-11  5:10 ` [bpf-next PATCH 4/4] bpf, selftests: Add three new sockmap tests for verdict only programs John Fastabend
2020-10-16  8:12   ` Jakub Sitnicki
2020-10-12  1:20 ` [bpf-next PATCH 0/4] bpf, sockmap: allow verdict only sk_skb progs 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;
as well as URLs for NNTP newsgroup(s).