mbox series

[bpf,0/2] tcp_bpf: update the rmem scheduling for ingress redirection

Message ID 20241017005742.3374075-1-zijianzhang@bytedance.com (mailing list archive)
Headers show
Series tcp_bpf: update the rmem scheduling for ingress redirection | expand

Message

Zijian Zhang Oct. 17, 2024, 12:57 a.m. UTC
From: Zijian Zhang <zijianzhang@bytedance.com>

We should do sk_rmem_schedule instead of sk_wmem_schedule in function
bpf_tcp_ingress. We also need to update sk_rmem_alloc accordingly to
account for the rmem.

Cong Wang (1):
  tcp_bpf: charge receive socket buffer in bpf_tcp_ingress()

Zijian Zhang (1):
  tcp_bpf: add sk_rmem_alloc related logic for ingress redirection

 include/linux/skmsg.h | 11 ++++++++---
 include/net/sock.h    | 10 ++++++++--
 net/core/skmsg.c      |  6 +++++-
 net/ipv4/tcp_bpf.c    |  6 ++++--
 4 files changed, 25 insertions(+), 8 deletions(-)

Comments

Cong Wang Nov. 8, 2024, 3:58 a.m. UTC | #1
On Thu, Oct 17, 2024 at 12:57:40AM +0000, zijianzhang@bytedance.com wrote:
> From: Zijian Zhang <zijianzhang@bytedance.com>
> 
> We should do sk_rmem_schedule instead of sk_wmem_schedule in function
> bpf_tcp_ingress. We also need to update sk_rmem_alloc accordingly to
> account for the rmem.
> 

Is it possible to have a test case for this? I think it would be easier
to prove and convince people to accept these changes.

Thanks!