lkml.org 
[lkml]   [2022]   [Jan]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH for-next v4] cgroup/bpf: fast path skb BPF filtering
On Wed, Jan 26, 2022 at 1:29 PM Pavel Begunkov <asml.silence@gmail.com> wrote:
>
> On 1/26/22 20:30, Martin KaFai Lau wrote:
> > On Wed, Jan 26, 2022 at 12:22:13AM +0000, Pavel Begunkov wrote:
> >> #define BPF_CGROUP_RUN_PROG_INET_INGRESS(sk, skb) \
> >> ({ \
> >> int __ret = 0; \
> >> - if (cgroup_bpf_enabled(CGROUP_INET_INGRESS)) \
> >> + if (cgroup_bpf_enabled(CGROUP_INET_INGRESS) && sk && \
> > From reading sk_filter_trim_cap() where this will be called, sk cannot be NULL.
> > If yes, the new sk test is not needed.
>
> Well, there is no sane way to verify how it's used considering
>
> EXPORT_SYMBOL(__cgroup_bpf_run_filter_skb);

BPF_CGROUP_RUN_PROG_INET_INGRESS() is used in one place.
Are you folks saying that you want to remove !sk check
from __cgroup_bpf_run_filter_skb()?
Seems like micro optimization, but sure why not.

EXPORT_SYMBOL() is there because of "ipv6 as a module" mess.
So it's not a concern.

Pls tag the subj of the patch with [PATCH bpf-next]
instead of "for-next".

\
 
 \ /
  Last update: 2022-01-27 06:09    [W:2.255 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site