mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Pavel Begunkov <asml.silence@gmail.com>
To: Alexei Starovoitov <alexei.starovoitov@gmail.com>
Cc: Martin KaFai Lau <kafai@fb.com>,
	Network Development <netdev@vger.kernel.org>,
	bpf <bpf@vger.kernel.org>, Alexei Starovoitov <ast@kernel.org>,
	Andrii Nakryiko <andrii@kernel.org>,
	Song Liu <songliubraving@fb.com>,
	LKML <linux-kernel@vger.kernel.org>,
	Stanislav Fomichev <sdf@google.com>
Subject: Re: [PATCH for-next v4] cgroup/bpf: fast path skb BPF filtering
Date: Thu, 27 Jan 2022 13:53:29 +0000	[thread overview]
Message-ID: <12d6b267-7c1b-1f2b-2ab1-8d24433f16ea@gmail.com> (raw)
In-Reply-To: <CAADnVQ+p0B-2_b8hYHEW4UGJ7-T0RMfnZ8cZ4NgpvjMiTo6YKA@mail.gmail.com>

On 1/27/22 05:08, Alexei Starovoitov wrote:
> 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.

Ok. I'd usually assume symbols for internal use only to be GPL.


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

-- 
Pavel Begunkov

      parent reply	other threads:[~2022-01-27 13:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-26  0:22 Pavel Begunkov
2022-01-26  0:28 ` Stanislav Fomichev
2022-01-26 20:30 ` Martin KaFai Lau
2022-01-26 21:28   ` Pavel Begunkov
2022-01-27  5:08     ` Alexei Starovoitov
2022-01-27  7:01       ` Martin KaFai Lau
2022-01-27 13:53       ` Pavel Begunkov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=12d6b267-7c1b-1f2b-2ab1-8d24433f16ea@gmail.com \
    --to=asml.silence@gmail.com \
    --cc=alexei.starovoitov@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=kafai@fb.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=sdf@google.com \
    --cc=songliubraving@fb.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®