DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] build: fix building when essential drivers in disable list
@ 2021-08-18 13:42 Bruce Richardson
  2021-09-09 13:38 ` Nicolau, Radu
  0 siblings, 1 reply; 3+ messages in thread
From: Bruce Richardson @ 2021-08-18 13:42 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson, juraj.linkes

The PCI and vdev bus drivers cannot be disabled for DPDK builds and
special logic is put in place to not skip them when they are specified
in the disable list. This logic is broken though, as the inclusion of
the driver-specific meson.build file is only included in the "else" leg
of the condition check. This means that when they are specified as
disabled the PCI and vdev buses are not disabled, but neither are their
source files compiled.

Fix this by moving the "subdir()" call into the next "if build" block,
ensuring that if not disabled the sources are always included. To take
account of the fact that the subdir call could itself disable the
driver, we add a break call into the following loop to ensure we quickly
fall through to the following block which stops processing appropriately
if the driver is disabled.

Fixes: 2e33309ebe03 ("config: enable/disable drivers in Arm builds")
Cc: juraj.linkes@pantheon.tech

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 drivers/meson.build | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/meson.build b/drivers/meson.build
index bc6f4f567f..747c93fe9c 100644
--- a/drivers/meson.build
+++ b/drivers/meson.build
@@ -109,16 +109,19 @@ foreach subpath:subdirs
                 build = false
                 reason = 'explicitly disabled via build config'
             endif
-        else
-            # pull in driver directory which should update all the local variables
-            subdir(drv_path)
         endif
 
         if build
+            # pull in driver directory which should update all the local variables
+            subdir(drv_path)
+
             # get dependency objs from strings
             shared_deps = ext_deps
             static_deps = ext_deps
             foreach d:deps
+                if not build
+                    break
+                endif
                 if not is_variable('shared_rte_' + d)
                     build = false
                     reason = 'missing internal dependency, "@0@"'.format(d)
-- 
2.30.2


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] build: fix building when essential drivers in disable list
  2021-08-18 13:42 [dpdk-dev] [PATCH] build: fix building when essential drivers in disable list Bruce Richardson
@ 2021-09-09 13:38 ` Nicolau, Radu
  2021-09-15 14:07   ` Thomas Monjalon
  0 siblings, 1 reply; 3+ messages in thread
From: Nicolau, Radu @ 2021-09-09 13:38 UTC (permalink / raw)
  To: Bruce Richardson, dev; +Cc: juraj.linkes


On 8/18/2021 2:42 PM, Bruce Richardson wrote:
> The PCI and vdev bus drivers cannot be disabled for DPDK builds and
> special logic is put in place to not skip them when they are specified
> in the disable list. This logic is broken though, as the inclusion of
> the driver-specific meson.build file is only included in the "else" leg
> of the condition check. This means that when they are specified as
> disabled the PCI and vdev buses are not disabled, but neither are their
> source files compiled.
>
> Fix this by moving the "subdir()" call into the next "if build" block,
> ensuring that if not disabled the sources are always included. To take
> account of the fact that the subdir call could itself disable the
> driver, we add a break call into the following loop to ensure we quickly
> fall through to the following block which stops processing appropriately
> if the driver is disabled.
>
> Fixes: 2e33309ebe03 ("config: enable/disable drivers in Arm builds")
> Cc: juraj.linkes@pantheon.tech
>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> ---
Tested-by: Radu Nicolau <radu.nicolau@intel.com>
Acked-by: Radu Nicolau <radu.nicolau@intel.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] build: fix building when essential drivers in disable list
  2021-09-09 13:38 ` Nicolau, Radu
@ 2021-09-15 14:07   ` Thomas Monjalon
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2021-09-15 14:07 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dev, juraj.linkes, Nicolau, Radu

09/09/2021 15:38, Nicolau, Radu:
> On 8/18/2021 2:42 PM, Bruce Richardson wrote:
> > The PCI and vdev bus drivers cannot be disabled for DPDK builds and
> > special logic is put in place to not skip them when they are specified
> > in the disable list. This logic is broken though, as the inclusion of
> > the driver-specific meson.build file is only included in the "else" leg
> > of the condition check. This means that when they are specified as
> > disabled the PCI and vdev buses are not disabled, but neither are their
> > source files compiled.
> >
> > Fix this by moving the "subdir()" call into the next "if build" block,
> > ensuring that if not disabled the sources are always included. To take
> > account of the fact that the subdir call could itself disable the
> > driver, we add a break call into the following loop to ensure we quickly
> > fall through to the following block which stops processing appropriately
> > if the driver is disabled.
> >
> > Fixes: 2e33309ebe03 ("config: enable/disable drivers in Arm builds")
> > Cc: juraj.linkes@pantheon.tech
> >
> > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> > ---
> Tested-by: Radu Nicolau <radu.nicolau@intel.com>
> Acked-by: Radu Nicolau <radu.nicolau@intel.com>

Applied, thanks



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-09-15 14:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-18 13:42 [dpdk-dev] [PATCH] build: fix building when essential drivers in disable list Bruce Richardson
2021-09-09 13:38 ` Nicolau, Radu
2021-09-15 14:07   ` Thomas Monjalon

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