On 12/05/2017 01:21 AM, Lawrence Brakmo wrote: [...] > Just a question for clarification: do you need to have this in > the uapi struct as well? Meaning, do you have a specific use case > where you do this check out of the BPF program given the below > two snd_cwnd/srtt_us check this internally in the ctx rewrite? > > Although is_fullsock is checked internally, the bpf program may want to > verify if a return value of zero is due to a non fullsock state. The issue is > that there are some ops that are called from both active and passive paths > so it is not possible to know just by the op type.
Ok, fair point. Patch applied to bpf-next, thanks Lawrence! > Do you plan to reuse the ctx assignment also for bpf_setsockopt() > and bpf_getsockopt() internally? > > If you mean, check is_fullsock instead of the call to sk_fullsock, then yes, > it is > a great idea. However, I would rather do it in another patch so we don’t delay > this one (I have other things almost ready that depend on this patch). That's fine by me.