On Fri, Mar 14, 2025 at 06:39:54PM +0100, David Marchand wrote: > On Fri, Mar 14, 2025 at 6:29 PM Bruce Richardson > <bruce.richard...@intel.com> wrote: > > > > What I'd actually like more, but never have had time to actually try > > > > out is > > > > to generalise the instruction-set-specific build stuff into the higher > > > > level > > > > drivers/meson.build code. After all, much of the code for doing so is > > > > just > > > > duplicated - check for AVX512 or AVX2 and if present build these files > > > > with > > > > the extra flags for that instruction set. > > > > > > > > Something similar with the base code. Most base code builds follow > > > > pretty > > > > much the exact same routine. > > > > > > Having those separate libraries require special cases every time, so > > > yes, it would be great if those could be factored in some shared > > > mechanism in drivers/meson.build. > > > > > > Putting the AVX stuff aside, and back to why we need those separate > > > libraries for base drivers... I think the main use is to waive some > > > build warnings, is there something else? > > > If so.. I think some drivers could already be cleaned (like net/e1000, > > > net/ngbe, net/octeontx, net/thunderx, net/txgbe, raw/ifpga at a first > > > glance).
Great. The question is whether that will always be true for those drivers. Even with those cleaned, we'll still need common base code handling, and with that done, it might as well be used for all base directories, not just a few. > > > > > > The AVX stuff seems a bit more complex, as there are multiple > > > combinations... > > > > > > > First attempt seems to go surprisingly smoothly[1]. It still builds, which > > is > > a start, though obviously some testing will be needed to check nothing else > > is broken. > > If it builds.. what more to ask for? :-) > > > It really helped that most code just seemed to have been copy-pasted around > > the place. > > I had a quick look, it lgtm on the principle. > > Could this be applied to lib/ ? (I see some complications with AVX512 > special instructions in lib/net..). > It hopefully can. I suspect there may be more complications in doing so, though. I notice a few libraries use instruction sets beyond the initial ones enabled in march=skylake-avx512, so it's not a common baseline we can easily switch to. I'll try and look at it if I get a chance. /Bruce