BPF List
 help / color / mirror / Atom feed
* [PATCH bpf 0/2] tcp_bpf: Fix the sk_mem_uncharge logic in tcp_bpf_sendmsg
@ 2024-10-16 23:48 zijianzhang
  2024-10-16 23:48 ` [PATCH bpf 1/2] selftests/bpf: Add apply_bytes test to test_txmsg_redir_wait_sndmem in test_sockmap zijianzhang
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: zijianzhang @ 2024-10-16 23:48 UTC (permalink / raw)
  To: bpf
  Cc: edumazet, john.fastabend, jakub, davem, dsahern, kuba, pabeni,
	ast, daniel, andrii, martin.lau, eddyz87, song, yonghong.song,
	kpsingh, sdf, haoluo, jolsa, mykolal, shuah, wangyufen,
	xiyou.wangcong, zijianzhang

From: Zijian Zhang <zijianzhang@bytedance.com>

When apply_bytes are not zero, sk_mem_uncharge for __SK_REDIRECT and
__SK_DROP in tcp_bpf_sendmsg has some problem. Added a selftest to trigger
the memory accounting WARNING, and fixed the sk_mem_uncharge logic in
tcp_bpf_sendmsg

Zijian Zhang (2):
  selftests/bpf: Add apply_bytes test to test_txmsg_redir_wait_sndmem in
    test_sockmap
  tcp_bpf: Fix the sk_mem_uncharge logic in tcp_bpf_sendmsg

 net/ipv4/tcp_bpf.c                         | 11 ++++-------
 tools/testing/selftests/bpf/test_sockmap.c |  6 +++++-
 2 files changed, 9 insertions(+), 8 deletions(-)

-- 
2.20.1


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

end of thread, other threads:[~2024-11-26 19:50 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-16 23:48 [PATCH bpf 0/2] tcp_bpf: Fix the sk_mem_uncharge logic in tcp_bpf_sendmsg zijianzhang
2024-10-16 23:48 ` [PATCH bpf 1/2] selftests/bpf: Add apply_bytes test to test_txmsg_redir_wait_sndmem in test_sockmap zijianzhang
2024-11-21  5:38   ` John Fastabend
2024-10-16 23:48 ` [PATCH bpf 2/2] tcp_bpf: Fix the sk_mem_uncharge logic in tcp_bpf_sendmsg zijianzhang
2024-11-21  5:43   ` John Fastabend
2024-11-21  5:49 ` [PATCH bpf 0/2] " John Fastabend
2024-11-26 19:50 ` 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