Re: [PATCH bpf-next v3 05/15] bpf: add bpf_skc_to_tcp6_sock() helper

2020-06-23 Thread Andrii Nakryiko
On Tue, Jun 23, 2020 at 12:47 PM Yonghong Song wrote: > > > > On 6/23/20 11:23 AM, Andrii Nakryiko wrote: > > On Tue, Jun 23, 2020 at 7:52 AM Yonghong Song wrote: > >> > >> > >> > >> On 6/22/20 11:39 PM, Andrii Nakryiko wrote: > >>> On Mon, Jun 22, 2020 at 5:38 PM Yonghong Song wrote: > > >

Re: [PATCH bpf-next v3 05/15] bpf: add bpf_skc_to_tcp6_sock() helper

2020-06-23 Thread Yonghong Song
On 6/23/20 1:11 PM, Andrii Nakryiko wrote: On Tue, Jun 23, 2020 at 12:47 PM Yonghong Song wrote: On 6/23/20 11:23 AM, Andrii Nakryiko wrote: On Tue, Jun 23, 2020 at 7:52 AM Yonghong Song wrote: On 6/22/20 11:39 PM, Andrii Nakryiko wrote: On Mon, Jun 22, 2020 at 5:38 PM Yonghong Son

Re: [PATCH bpf-next v3 05/15] bpf: add bpf_skc_to_tcp6_sock() helper

2020-06-23 Thread Yonghong Song
On 6/23/20 11:23 AM, Andrii Nakryiko wrote: On Tue, Jun 23, 2020 at 7:52 AM Yonghong Song wrote: On 6/22/20 11:39 PM, Andrii Nakryiko wrote: On Mon, Jun 22, 2020 at 5:38 PM Yonghong Song wrote: The helper is used in tracing programs to cast a socket pointer to a tcp6_sock pointer. The

Re: [PATCH bpf-next v3 05/15] bpf: add bpf_skc_to_tcp6_sock() helper

2020-06-23 Thread Andrii Nakryiko
On Tue, Jun 23, 2020 at 7:52 AM Yonghong Song wrote: > > > > On 6/22/20 11:39 PM, Andrii Nakryiko wrote: > > On Mon, Jun 22, 2020 at 5:38 PM Yonghong Song wrote: > >> > >> The helper is used in tracing programs to cast a socket > >> pointer to a tcp6_sock pointer. > >> The return value could be N

Re: [PATCH bpf-next v3 05/15] bpf: add bpf_skc_to_tcp6_sock() helper

2020-06-23 Thread Yonghong Song
On 6/22/20 11:39 PM, Andrii Nakryiko wrote: On Mon, Jun 22, 2020 at 5:38 PM Yonghong Song wrote: The helper is used in tracing programs to cast a socket pointer to a tcp6_sock pointer. The return value could be NULL if the casting is illegal. A new helper return type RET_PTR_TO_BTF_ID_OR_N

Re: [PATCH bpf-next v3 05/15] bpf: add bpf_skc_to_tcp6_sock() helper

2020-06-22 Thread Andrii Nakryiko
On Mon, Jun 22, 2020 at 5:38 PM Yonghong Song wrote: > > The helper is used in tracing programs to cast a socket > pointer to a tcp6_sock pointer. > The return value could be NULL if the casting is illegal. > > A new helper return type RET_PTR_TO_BTF_ID_OR_NULL is added > so the verifier is able t

Re: [PATCH bpf-next v3 05/15] bpf: add bpf_skc_to_tcp6_sock() helper

2020-06-22 Thread kernel test robot
Hi Yonghong, I love your patch! Yet something to improve: [auto build test ERROR on bpf-next/master] url: https://github.com/0day-ci/linux/commits/Yonghong-Song/implement-bpf-iterator-for-tcp-and-udp-sockets/20200623-090149 base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next

Re: [PATCH bpf-next v3 05/15] bpf: add bpf_skc_to_tcp6_sock() helper

2020-06-22 Thread kernel test robot
Hi Yonghong, I love your patch! Yet something to improve: [auto build test ERROR on bpf-next/master] url: https://github.com/0day-ci/linux/commits/Yonghong-Song/implement-bpf-iterator-for-tcp-and-udp-sockets/20200623-090149 base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next

[PATCH bpf-next v3 05/15] bpf: add bpf_skc_to_tcp6_sock() helper

2020-06-22 Thread Yonghong Song
The helper is used in tracing programs to cast a socket pointer to a tcp6_sock pointer. The return value could be NULL if the casting is illegal. A new helper return type RET_PTR_TO_BTF_ID_OR_NULL is added so the verifier is able to deduce proper return types for the helper. Different from the pr