From: Bruce Richardson <bruce.richardson@intel.com>
To: David Marchand <david.marchand@redhat.com>
Cc: <dev@dpdk.org>
Subject: Re: [PATCH v2 0/4] remove driver-specific logic for AVX builds
Date: Tue, 18 Mar 2025 11:51:24 +0000 [thread overview]
Message-ID: <Z9lePOm9TEz9AXn-@bricha3-mobl1.ger.corp.intel.com> (raw)
In-Reply-To: <CAJFAV8w_gdDZ49nJNMxaxvk-Sv8v6T_FK6nWbVyaoKELjaJRUg@mail.gmail.com>
On Mon, Mar 17, 2025 at 10:50:24AM +0100, David Marchand wrote:
> On Fri, Mar 14, 2025 at 6:44 PM Bruce Richardson
> <bruce.richardson@intel.com> wrote:
> >
> > A number of drivers had special optimized AVX2 and AVX512 code paths
> > for performance reasons, and these tended to have copy-pasted logic
> > to build those files. Centralise that logic in the main
> > drivers/meson.build file to avoid duplication.
> >
> > v2: add patch 4 to remove use of unnecessary CC_AVX2_SUPPORT flag
> >
> > Bruce Richardson (4):
> > build: add generalized AVX handling for drivers
> > net/intel: use common AVX build code
> > drivers/net: build use common AVX handling
> > drivers/net: remove AVX2 build-time define
> >
> > drivers/meson.build | 30 +++++++++++++++++++++++++++
> > drivers/net/bnxt/bnxt_ethdev.c | 2 --
> > drivers/net/bnxt/meson.build | 10 +--------
> > drivers/net/enic/meson.build | 10 +--------
> > drivers/net/intel/i40e/meson.build | 26 ++---------------------
> > drivers/net/intel/iavf/meson.build | 25 ++--------------------
> > drivers/net/intel/ice/meson.build | 25 ++--------------------
> > drivers/net/intel/idpf/meson.build | 25 ++--------------------
> > drivers/net/nfp/meson.build | 10 +--------
> > drivers/net/octeon_ep/meson.build | 13 +-----------
> > drivers/net/octeon_ep/otx_ep_ethdev.c | 4 ----
> > drivers/net/virtio/meson.build | 9 +-------
> > 12 files changed, 43 insertions(+), 146 deletions(-)
>
> event/dlb2 can be converted too, or is there something special about
> this driver?
>
Ideally, yes, but it's also a bit special in that it only builds *either*
the SSE code path or the AVX-512 one, and has duplicate symbols/functions
in the two files. This is a bit strange, and probably not what we want, so
I may need to do some work on it before converting it to this scheme.
>
> As part of the discussion on the base drivers, and seeing this series,
> it would be cool if we had a generic framework to specify a set of
> cflags for a set of sources.
I'd rather not have that. Meson doesn't support having per-c-file flags,
and I don't think we should resort to massive amounts of hackery to try and
support this. I think having the same set of cflags across a whole
component is a good principle, one which we should only violate when we
have to e.g. for base dirs, and for ISA-specific files.
> But at least this series lgtm and is a first step.
>
Thanks.
/Bruce
next prev parent reply other threads:[~2025-03-18 11:52 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-14 17:23 [PATCH 0/3] " Bruce Richardson
2025-03-14 17:23 ` [PATCH 1/3] build: add generalized AVX handling for drivers Bruce Richardson
2025-03-14 17:23 ` [PATCH 2/3] net/intel: use common AVX build code Bruce Richardson
2025-03-14 17:23 ` [PATCH 3/3] drivers/net: build use common AVX handling Bruce Richardson
2025-03-14 17:31 ` David Marchand
2025-03-14 17:37 ` Bruce Richardson
2025-03-14 17:44 ` [PATCH v2 0/4] remove driver-specific logic for AVX builds Bruce Richardson
2025-03-14 17:44 ` [PATCH v2 1/4] build: add generalized AVX handling for drivers Bruce Richardson
2025-03-14 17:44 ` [PATCH v2 2/4] net/intel: use common AVX build code Bruce Richardson
2025-03-14 17:44 ` [PATCH v2 3/4] drivers/net: build use common AVX handling Bruce Richardson
2025-03-14 17:44 ` [PATCH v2 4/4] drivers/net: remove AVX2 build-time define Bruce Richardson
2025-03-17 9:47 ` David Marchand
2025-03-17 9:50 ` [PATCH v2 0/4] remove driver-specific logic for AVX builds David Marchand
2025-03-18 11:51 ` Bruce Richardson [this message]
2025-03-18 17:34 ` [PATCH v3 00/11] remove component-specific " Bruce Richardson
2025-03-18 17:34 ` [PATCH v3 01/11] build: add generalized AVX handling for drivers Bruce Richardson
2025-03-18 17:34 ` [PATCH v3 02/11] net/intel: use common AVX build code Bruce Richardson
2025-03-18 17:34 ` [PATCH v3 03/11] drivers/net: build use common AVX handling Bruce Richardson
2025-03-18 17:34 ` [PATCH v3 04/11] drivers/net: remove AVX2 build-time define Bruce Richardson
2025-03-18 17:42 ` Ajit Khaparde
2025-03-18 17:34 ` [PATCH v3 05/11] event/dlb2: build using common AVX handling Bruce Richardson
2025-03-18 17:34 ` [PATCH v3 06/11] build: add generalized AVX handling for libs Bruce Richardson
2025-03-18 17:35 ` [PATCH v3 07/11] acl: use common AVX build handling Bruce Richardson
2025-03-18 17:35 ` [PATCH v3 08/11] fib: " Bruce Richardson
2025-03-18 17:35 ` [PATCH v3 09/11] net: simplify build-time logic for x86 Bruce Richardson
2025-03-18 17:35 ` [PATCH v3 10/11] net: use common AVX512 build code Bruce Richardson
2025-03-18 17:35 ` [PATCH v3 11/11] member: use common AVX512 build support Bruce Richardson
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=Z9lePOm9TEz9AXn-@bricha3-mobl1.ger.corp.intel.com \
--to=bruce.richardson@intel.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
/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).