[PATCH] drivers: skip build of sub-libs not supporting IOVA mode

Zhang, Qi Z qi.z.zhang at intel.com
Thu Mar 2 15:16:04 CET 2023



> -----Original Message-----
> From: Thomas Monjalon <thomas at monjalon.net>
> Sent: Thursday, March 2, 2023 9:58 PM
> To: Zhang, Qi Z <qi.z.zhang at intel.com>
> Cc: dev at dpdk.org; David Marchand <david.marchand at redhat.com>;
> Richardson, Bruce <bruce.richardson at intel.com>; stable at dpdk.org; Wu,
> Jingjing <jingjing.wu at intel.com>; Xing, Beilei <beilei.xing at intel.com>;
> McDaniel, Timothy <timothy.mcdaniel at intel.com>; Ajit Khaparde
> <ajit.khaparde at broadcom.com>; Somnath Kotur
> <somnath.kotur at broadcom.com>; Daley, John <johndale at cisco.com>;
> Hyong Youb Kim <hyonkim at cisco.com>; Dongdong Liu
> <liudongdong3 at huawei.com>; Yisen Zhuang <yisen.zhuang at huawei.com>;
> Zhang, Yuying <yuying.zhang at intel.com>; Maxime Coquelin
> <maxime.coquelin at redhat.com>; Xia, Chenbo <chenbo.xia at intel.com>;
> Shijith Thotton <sthotton at marvell.com>; Matz, Olivier
> <olivier.matz at 6wind.com>
> Subject: Re: [PATCH] drivers: skip build of sub-libs not supporting IOVA mode
> 
> 02/03/2023 14:52, Zhang, Qi Z:
> > From: Thomas Monjalon <thomas at 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: stable at dpdk.org
> > >
> > > Signed-off-by: Thomas Monjalon <thomas at 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.

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

 


> 



More information about the stable mailing list