[PATCH 0/2] ipv4, bpf: Introduced to support the ULP to get or set sockets

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

 



We want call bpf_setsockopt to replace the kernel module in the TCP_ULP
case. The purpose is to customize the behavior in connect and sendmsg.
We have an open source community project kmesh (kmesh.net). Based on
this, we refer to some processes of tcp fastopen to implement delayed
connet and perform HTTP DNAT when sendmsg.In this case, we need to parse
HTTP packets in the bpf program and set TCP_ULP for the specified socket.

Note that tcp_getsockopt and tcp_setsockopt support TCP_ULP, while
bpf_getsockopt and bpf_setsockopt do not support TCP_ULP.
I'm not sure why there is such a difference, but I noticed that
tcp_setsockopt is called in bpf_setsockopt.I think we can add the
handling of this case.

zhangmingyi (2):
  ipv4, bpf: Introduced to support the ULP to get or set sockets
  add selftest for TCP_ULP in bpf_setsockopt

 net/core/filter.c                             |  1 +
 .../selftests/bpf/progs/setget_sockopt.c      | 21 ++++++++++++++++---
 2 files changed, 19 insertions(+), 3 deletions(-)

-- 
2.43.0





[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