DPDK patches and discussions
 help / color / mirror / Atom feed
From: Konstantin Ananyev <konstantin.ananyev@huawei.com>
To: Thomas Monjalon <thomas@monjalon.net>,
	Stephen Hemminger <stephen@networkplumber.org>,
	Yoav Winstein <yoav.w@claroty.com>,
	"Konstantin Ananyev" <konstantin.v.ananyev@yandex.ru>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: RE: [PATCH] bpf: don't verify classic bpfs
Date: Thu, 27 Jun 2024 18:14:18 +0000	[thread overview]
Message-ID: <204ab4619d76452fb2a1b49e5013cb8c@huawei.com> (raw)
In-Reply-To: <4846180.STdkYbjpsp@thomas>


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

Yep, it does, thanks Thomas for highlighting it.

Yoav,  can I ask submitter to check would:
https://patchwork.dpdk.org/project/dpdk/list/?series=32321
fix the problem you are facing?
I think that the root cause is the same.
 

  reply	other threads:[~2024-06-27 18:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-12  5:55 Yoav Winstein
2024-05-12 16:03 ` Stephen Hemminger
2024-05-16  9:36   ` Konstantin Ananyev
2024-06-27 15:36     ` Thomas Monjalon
2024-06-27 18:14       ` 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=204ab4619d76452fb2a1b49e5013cb8c@huawei.com \
    --to=konstantin.ananyev@huawei.com \
    --cc=dev@dpdk.org \
    --cc=konstantin.v.ananyev@yandex.ru \
    --cc=stephen@networkplumber.org \
    --cc=thomas@monjalon.net \
    --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 NNTP newsgroup(s).