[bpf-next PATCH v2 0/2] Add skb_adjust_room() for SK_SKB

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This implements the helper skb_adjust_room() for BPF_SKS_SK_STREAM_VERDICT
programs so we can push/pop headers from the data on recieve. One use
case is to pop TLS headers off 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 tests.

v1->v2:
 Fix error path for TLS case (Daniel)
 check mode input is 0 because we don't use it now (Daniel)
 Remove incorrect/misleading comment (Lorenz)

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                                  |   46 ++++++++++++++++++++
 .../selftests/bpf/progs/test_sockmap_kern.h        |   34 +++++++++++----
 tools/testing/selftests/bpf/test_sockmap.c         |   27 +++---------
 3 files changed, 77 insertions(+), 30 deletions(-)

--
Signature



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux