All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: Stephen Hemminger <stephen@networkplumber.org>,
	Yoav Winstein <yoav.w@claroty.com>,
	Konstantin Ananyev <konstantin.v.ananyev@yandex.ru>
Cc: dev@dpdk.org
Subject: Re: [PATCH] bpf: don't verify classic bpfs
Date: Thu, 27 Jun 2024 17:36:43 +0200	[thread overview]
Message-ID: <4846180.STdkYbjpsp@thomas> (raw)
In-Reply-To: <2eaeaf90d9a94c8ca199f5bb51e0ba38@huawei.com>

16/05/2024 11:36, Konstantin Ananyev:
> 
> > On Sun, 12 May 2024 08:55:45 +0300
> > Yoav Winstein <yoav.w@claroty.com> wrote:
> > 
> > > When classic BPFs with lots of branching instructions are compiled,
> > > __rte_bpf_bpf_validate runs way too slow. A simple bpf such as:
> > > 'ether host a0:38:6d:af:17:eb or b3:a3:ff:b6:c1:ef or ...' 12 times
> > >
> > > results in ~1 minute of bpf validation.
> > > This patch makes __rte_bpf_bpf_validate be aware of bpf_prm originating
> > > from classic BPF, allowing to safely skip over the validation.
> > >
> > > Signed-off-by: Yoav Winstein <yoav.w@claroty.com>
> > > ---
> > 
> > No.
> > Wallpapering over a performance bug in the BPF library is not
> > the best way to handle this. Please analyze the problem in the BPF
> > library; it should be fixed there.
> 
> +1
> Blindly disabling verification for all cBPFs is the worst possible option here.
> We need at least try to understand what exactly causing such slowdown.

+1

You didn't mention it is also breaking ABI compatibility.




  reply	other threads:[~2024-06-27 15:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-12  5:55 [PATCH] bpf: don't verify classic bpfs Yoav Winstein
2024-05-12 16:03 ` Stephen Hemminger
2024-05-16  9:36   ` Konstantin Ananyev
2024-06-27 15:36     ` Thomas Monjalon [this message]
2024-06-27 18:14       ` Konstantin Ananyev
  -- strict thread matches above, loose matches on Subject: below --
2024-05-12  6:00 Yoav Winstein
2024-05-12  5:51 Yoav Winstein
2024-05-12  5:35 Yoav Winstein

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=4846180.STdkYbjpsp@thomas \
    --to=thomas@monjalon.net \
    --cc=dev@dpdk.org \
    --cc=konstantin.v.ananyev@yandex.ru \
    --cc=stephen@networkplumber.org \
    --cc=yoav.w@claroty.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.