On 2/2/24 16:40, Martin KaFai Lau wrote:
I have a question/request.
On top of tagging nullable, can we extend the ctx_arg_info idea here to
allow changing the pointer type?
In particular, take a stub function in bpf_tcp_ca.c:
static u32 bpf_tcp_ca_ssthresh(struct tcp_sock *tp)
{
return 0;
}
Instead of the "struct sock *sk" argument as defined in the
tcp_congestion_ops, the stub function uses "struct tcp_sock *tp'. If we
can reuse the ctx_arg_info idea here, then it can remove the existing
way of changing the pointer type from bpf_tcp_ca_is_valid_access.
A question just come to me. Why doesn't just define the argument as a
pointer to struct tpc_sock in the definition of the function pointer?