mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] ipv4, bpf: Introduced to support the ULP to get or set sockets
@ 2025-01-27  9:07 zhangmingyi
  2025-01-27  9:07 ` [PATCH 1/2] " zhangmingyi
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: zhangmingyi @ 2025-01-27  9:07 UTC (permalink / raw)
  To: ast, daniel, andrii, martin.lau, song, yhs, john.fastabend,
	kpsingh, sdf, haoluo, jolsa
  Cc: bpf, linux-kernel, yanan, wuchangye, xiesongyang, liuxin350,
	liwei883, tianmuyang, zhangmingyi5

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


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

end of thread, other threads:[~2025-01-29 23:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-01-27  9:07 [PATCH 0/2] ipv4, bpf: Introduced to support the ULP to get or set sockets zhangmingyi
2025-01-27  9:07 ` [PATCH 1/2] " zhangmingyi
2025-01-29 21:20   ` Martin KaFai Lau
2025-01-27  9:07 ` [PATCH 2/2] add selftest for TCP_ULP in bpf_setsockopt zhangmingyi
2025-01-29 23:31   ` Martin KaFai Lau
2025-01-29 20:58 ` [PATCH 0/2] ipv4, bpf: Introduced to support the ULP to get or set sockets Martin KaFai Lau

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

Powered by JetHome