Re: [RFC bpf-next v4 5/6] bpf: Create argument information for nullable arguments.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





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?




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux