Re: [PATCH bpf-next v4 00/10] Introduce unstable CT lookup helpers

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

 



On Fri, Dec 17, 2021 at 07:20:21AM IST, Kumar Kartikeya Dwivedi wrote:
> This series adds unstable conntrack lookup helpers using BPF kfunc support.  The
> patch adding the lookup helper is based off of Maxim's recent patch to aid in
> rebasing their series on top of this, all adjusted to work with module kfuncs [0].
>
>   [0]: https://lore.kernel.org/bpf/20211019144655.3483197-8-maximmi@xxxxxxxxxx
>
> To enable returning a reference to struct nf_conn, the verifier is extended to
> support reference tracking for PTR_TO_BTF_ID, and kfunc is extended with support
> for working as acquire/release functions, similar to existing BPF helpers. kfunc
> returning pointer (limited to PTR_TO_BTF_ID in the kernel) can also return a
> PTR_TO_BTF_ID_OR_NULL now, typically needed when acquiring a resource can fail.
> kfunc can also receive PTR_TO_CTX and PTR_TO_MEM (with some limitations) as
> arguments now. There is also support for passing a mem, len pair as argument
> to kfunc now. In such cases, passing pointer to unsized type (void) is also
> permitted.
>
> Please see individual commits for details.
>
> Note: BPF CI needs to add the following to config to test the set. I did update
> the selftests config in patch 8, but not sure if that is enough.
>
> 	CONFIG_NETFILTER=y
> 	CONFIG_NF_DEFRAG_IPV4=y
> 	CONFIG_NF_DEFRAG_IPV6=y
> 	CONFIG_NF_CONNTRACK=y
>

Hm, so this is not showing up in BPF CI, is it some mistake from my side? The
last couple of versions produced build time warnings in Patchwork, that I fixed,
which I suspected was the main cause.

There's still one coming from the last patch, but based on [0], I am not sure
whether I should be doing things any differently (and if I do fix it, it also
needs to be done for the functions added before). The warnings are from the 11
new kfuncs I added in net/bpf/test_run.c, for their missing declarations.

Comments?

[0]: https://lore.kernel.org/bpf/20200326235426.ei6ae2z5ek6uq3tt@ast-mbp

> [...]

--
Kartikeya



[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