Message ID | 20241016234838.3167769-1-zijianzhang@bytedance.com (mailing list archive) |
---|---|
Headers | show |
Series | tcp_bpf: Fix the sk_mem_uncharge logic in tcp_bpf_sendmsg | expand |
zijianzhang@ wrote: > 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 I would probably prefer the patches with the fix first than the selftest just to avoid tripping up any bisect. But patches look good. Thanks and sorry for the delay again I was travelling and OOO for a bit. > > net/ipv4/tcp_bpf.c | 11 ++++------- > tools/testing/selftests/bpf/test_sockmap.c | 6 +++++- > 2 files changed, 9 insertions(+), 8 deletions(-) > > -- > 2.20.1 >
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(-)