“e50d64097b6e63278789ee3a4394d127bd6e4254”上不存在“arch/arm/include/asm/proc-fns.h”
提交 41c95dd6 编写于 作者: J Jörn-Thorben Hinz 提交者: Alexei Starovoitov

bpf: Allow a TCP CC to write sk_pacing_rate and sk_pacing_status

A CC that implements tcp_congestion_ops.cong_control() should be able to
control sk_pacing_rate and set sk_pacing_status, since
tcp_update_pacing_rate() is never called in this case. A built-in CC or
one from a kernel module is already able to write to both struct sock
members. For a BPF program, write access has not been allowed, yet.
Signed-off-by: NJörn-Thorben Hinz <jthinz@mailbox.tu-berlin.de>
Reviewed-by: NMartin KaFai Lau <kafai@fb.com>
Link: https://lore.kernel.org/r/20220622191227.898118-2-jthinz@mailbox.tu-berlin.deSigned-off-by: NAlexei Starovoitov <ast@kernel.org>
上级 9676fecc
......@@ -111,6 +111,12 @@ static int bpf_tcp_ca_btf_struct_access(struct bpf_verifier_log *log,
}
switch (off) {
case offsetof(struct sock, sk_pacing_rate):
end = offsetofend(struct sock, sk_pacing_rate);
break;
case offsetof(struct sock, sk_pacing_status):
end = offsetofend(struct sock, sk_pacing_status);
break;
case bpf_ctx_range(struct inet_connection_sock, icsk_ca_priv):
end = offsetofend(struct inet_connection_sock, icsk_ca_priv);
break;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册