[PATCH 3/3] drivers/net: build use common AVX handling

Bruce Richardson bruce.richardson at intel.com
Fri Mar 14 18:37:52 CET 2025


On Fri, Mar 14, 2025 at 06:31:08PM +0100, David Marchand wrote:
> On Fri, Mar 14, 2025 at 6:24 PM Bruce Richardson
> <bruce.richardson at intel.com> wrote:
> > diff --git a/drivers/net/octeon_ep/meson.build b/drivers/net/octeon_ep/meson.build
> > index 1b34db3edc..9bf4627894 100644
> > --- a/drivers/net/octeon_ep/meson.build
> > +++ b/drivers/net/octeon_ep/meson.build
> > @@ -15,18 +15,8 @@ sources = files(
> >
> >  if arch_subdir == 'x86'
> >      sources += files('cnxk_ep_rx_sse.c')
> > -    if cc.get_define('__AVX2__', args: machine_args) != ''
> > -        cflags += ['-DCC_AVX2_SUPPORT']
> > -        sources += files('cnxk_ep_rx_avx.c')
> > -    elif cc.has_multi_arguments(cc_avx2_flags)
> > -        cflags += ['-DCC_AVX2_SUPPORT']
> > -        otx_ep_avx2_lib = static_library('otx_ep_avx2_lib',
> > -                        'cnxk_ep_rx_avx.c',
> > -                        dependencies: [static_rte_ethdev, static_rte_pci, static_rte_bus_pci],
> > -                        include_directories: includes,
> > -                        c_args: [cflags, cc_avx2_flags])
> > -        objs += otx_ep_avx2_lib.extract_objects('cnxk_ep_rx_avx.c')
> > -    endif
> > +    cflags += ['-DCC_AVX2_SUPPORT']
> 
> Could it be set by drivers/meson.build?
> Similarly to AVX512.
> 
Yes, but really I'd rather see it removed. It's now the same as the defines
for x86, since we always build AVX2 support when building for x86, because
all compilers we support can generate AVX2 code.

/Bruce


More information about the dev mailing list