From: Yixin Shen Date: Wed, 29 Mar 2023 07:35:57 +0000 (+0000) Subject: bpf: allow a TCP CC to write app_limited X-Git-Tag: v6.6.7~2736^2~129^2~51^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=562dc56a88983421a6c5a46e0feb891873d118a1;p=platform%2Fkernel%2Flinux-starfive.git bpf: allow a TCP CC to write app_limited A CC that implements tcp_congestion_ops.cong_control() should be able to write app_limited. A built-in CC or one from a kernel module is already able to write to this member of struct tcp_sock. For a BPF program, write access has not been allowed, yet. Signed-off-by: Yixin Shen Link: https://lore.kernel.org/r/20230329073558.8136-2-bobankhshen@gmail.com Signed-off-by: Martin KaFai Lau --- diff --git a/net/ipv4/bpf_tcp_ca.c b/net/ipv4/bpf_tcp_ca.c index e8b2782..ea21c96 100644 --- a/net/ipv4/bpf_tcp_ca.c +++ b/net/ipv4/bpf_tcp_ca.c @@ -113,6 +113,9 @@ static int bpf_tcp_ca_btf_struct_access(struct bpf_verifier_log *log, case offsetof(struct tcp_sock, ecn_flags): end = offsetofend(struct tcp_sock, ecn_flags); break; + case offsetof(struct tcp_sock, app_limited): + end = offsetofend(struct tcp_sock, app_limited); + break; default: bpf_log(log, "no write support to tcp_sock at off %d\n", off); return -EACCES;