DPDK-dev Archive mirror
 help / color / mirror / Atom feed
From: Konstantin Ananyev <konstantin.ananyev@huawei.com>
To: Stephen Hemminger <stephen@networkplumber.org>,
	Yoav Winstein <yoav.w@claroty.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	Konstantin Ananyev <konstantin.v.ananyev@yandex.ru>
Subject: RE: [PATCH] bpf: don't verify classic bpfs
Date: Thu, 16 May 2024 09:36:12 +0000	[thread overview]
Message-ID: <2eaeaf90d9a94c8ca199f5bb51e0ba38@huawei.com> (raw)
In-Reply-To: <20240512090325.7c085db5@hermes.local>



> 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.

  reply	other threads:[~2024-05-16  9:36 UTC|newest]

Thread overview: 6+ 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 [this message]
  -- 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=2eaeaf90d9a94c8ca199f5bb51e0ba38@huawei.com \
    --to=konstantin.ananyev@huawei.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).