netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [bpf-next PATCH 0/2] Add skb_adjust_room() for SK_SKB
@ 2020-09-26  4:26 John Fastabend
  2020-09-26  4:27 ` [bpf-next PATCH 1/2] bpf, sockmap: add skb_adjust_room to pop bytes off ingress payload John Fastabend
  2020-09-26  4:27 ` [bpf-next PATCH 2/2] bpf, sockmap: update selftests to use skb_adjust_room John Fastabend
  0 siblings, 2 replies; 7+ messages in thread
From: John Fastabend @ 2020-09-26  4:26 UTC (permalink / raw)
  To: ast, daniel; +Cc: netdev, john.fastabend, jakub, lmb

This implements the helper skb_adjust_room() for BPF_SKS_BK_STREAM_VERDICT
programs so we can push/pop headers from the data on recieve. The
obvious use case is to pop TLS headers of kTLS packets.

The first patch implements the helper and the second updates test_sockmap
to use it removing some case handling we had to do earlier to account for
the TLS headers in the kTLS case.

I have a couple more series to flush off my stack then I'll work on
modernizing the test_sockmap tests themselves. It was created before
global data and a few other nice things so its a bit more verbose
than necessary.

Thanks,
John

---

John Fastabend (2):
      bpf, sockmap: add skb_adjust_room to pop bytes off ingress payload
      bpf, sockmap: update selftests to use skb_adjust_room


 net/core/filter.c                                  |   51 ++++++++++++++++++++
 .../selftests/bpf/progs/test_sockmap_kern.h        |   34 ++++++++++---
 tools/testing/selftests/bpf/test_sockmap.c         |   27 ++---------
 3 files changed, 82 insertions(+), 30 deletions(-)

--
Signature

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

end of thread, other threads:[~2020-10-01  1:59 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-26  4:26 [bpf-next PATCH 0/2] Add skb_adjust_room() for SK_SKB John Fastabend
2020-09-26  4:27 ` [bpf-next PATCH 1/2] bpf, sockmap: add skb_adjust_room to pop bytes off ingress payload John Fastabend
2020-09-29 14:59   ` Daniel Borkmann
2020-09-29 15:41     ` John Fastabend
2020-09-30  9:55   ` Jakub Sitnicki
2020-10-01  1:59     ` John Fastabend
2020-09-26  4:27 ` [bpf-next PATCH 2/2] bpf, sockmap: update selftests to use skb_adjust_room John Fastabend

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