02/03/2023 15:16, Zhang, Qi Z: > From: Thomas Monjalon <tho...@monjalon.net> > > 02/03/2023 14:52, Zhang, Qi Z: > > > From: Thomas Monjalon <tho...@monjalon.net> > > > > If IOVA as PA is disabled and the driver does not support IOVA as > > > > VA, the build of the driver was disabled. > > > > Unfortunately some drivers were building some sub-libraries (with > > > > specific options for vector paths) which were not disabled. > > > > > > > > The build parsing of those drivers need to be skipped earlier to > > > > avoid defining the sub-libraries. > > > > > > > > Fixes: a986c2b7973d ("build: add option to configure IOVA mode as > > > > PA") > > > > Cc: sta...@dpdk.org > > > > > > > > Signed-off-by: Thomas Monjalon <tho...@monjalon.net> > > [...] > > > > --- a/drivers/meson.build > > > > +++ b/drivers/meson.build > > > > @@ -127,9 +127,9 @@ foreach subpath:subdirs > > > > # pull in driver directory which should update all the > > > > local > > variables > > > > subdir(drv_path) > > > > > > > > - if dpdk_conf.get('RTE_IOVA_AS_PA') == 0 and not > > > > pmd_supports_disable_iova_as_pa and not > > > > always_enable.contains(drv_path) > > > > + if not get_option('enable_iova_as_pa') and not > > > > + pmd_supports_disable_iova_as_pa and not > > > > + always_enable.contains(drv_path) > > > > build = false > > > > - reason = 'driver does not support disabling IOVA as PA > > > > mode' > > > > + reason = 'IOVA as VA not supported' > > > > endif > > > > > > If we check enable_iova_as_pa for each unsupported driver , do we still > > need "pmd_supports_disable_iova_as_pa"? > > > > They are a bit redundant. > > That's why I prefer my previous solution for i40e and iavf, > because, someday we may claim pmd_supports_disable_iova_as_pa = true but > still leave avx part not be fixed.
Both are in the same file, so I don't see how it could be missed, especially if those lines are placed together. We have a variable used commonly with a standardized message, we must use it, at least to allow easy grep of this support. > > The idea is to use pmd_supports_disable_iova_as_pa (could be renamed) as > > it is simpler to use. > > But in the case of drivers having sub-libs (always enabled), we need an > > extra > > check of enable_iova_as_pa inside the driver file.