Skip to contentSkip to conversation

drivers: add dependencies for some classes

PATCH Applied David Marchand 4 participants 6 messages Aug 25, 2023 – Aug 29, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers: add dependencies for some classes

A few classes meson.build were not expressing dependencies to the associated device library. Define std_deps for baseband, gpu and regex drivers.

---
 drivers/baseband/acc/meson.build           | 2 +-
 drivers/baseband/fpga_5gnr_fec/meson.build | 2 +-
 drivers/baseband/fpga_lte_fec/meson.build  | 2 +-
 drivers/baseband/la12xx/meson.build        | 2 +-
 drivers/baseband/meson.build               | 2 ++
 drivers/baseband/null/meson.build          | 2 +-
 drivers/baseband/turbo_sw/meson.build      | 2 +-
 drivers/gpu/cuda/meson.build               | 2 +-
 drivers/gpu/meson.build                    | 2 ++
 drivers/regex/cn9k/meson.build             | 2 +-
 drivers/regex/meson.build                  | 2 +-
 drivers/regex/mlx5/meson.build             | 2 +-
 12 files changed, 14 insertions(+), 10 deletions(-)
drivers/baseband/acc/meson.build +1 -1
index 966cd65c79..27a654b501 100644
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2020 Intel Corporation
 
-deps += ['bbdev', 'bus_pci']
+deps += ['bus_pci']
 
 sources = files('rte_acc100_pmd.c', 'rte_vrb_pmd.c')
 
drivers/baseband/fpga_5gnr_fec/meson.build +1 -1
index 745cd271f2..c3678d23eb 100644
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2020 Intel Corporation
 
-deps += ['bbdev', 'bus_vdev', 'ring', 'pci', 'bus_pci']
+deps += ['bus_vdev', 'ring', 'pci', 'bus_pci']
 
 sources = files('rte_fpga_5gnr_fec.c')
 
drivers/baseband/fpga_lte_fec/meson.build +1 -1
index e00688da33..14e07826ef 100644
@@ -1,5 +1,5 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2019 Intel Corporation
 
-deps += ['bbdev', 'bus_vdev', 'ring', 'pci', 'bus_pci']
+deps += ['bus_vdev', 'ring', 'pci', 'bus_pci']
 sources = files('fpga_lte_fec.c')
drivers/baseband/la12xx/meson.build +1 -1
index 7a017dcffa..7b7e41c961 100644
@@ -1,6 +1,6 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright 2020-2021 NXP
 
-deps += ['bbdev', 'bus_vdev', 'ring']
+deps += ['bus_vdev', 'ring']
 
 sources = files('bbdev_la12xx.c')
drivers/baseband/meson.build +2 -0
index 1d732da882..3420d98564 100644
@@ -14,4 +14,6 @@ drivers = [
         'turbo_sw',
 ]
 
+std_deps = [ 'bbdev' ]
+
 log_prefix = 'pmd.bb'
drivers/baseband/null/meson.build +1 -1
index 02ef7db573..22863f0bd8 100644
@@ -1,5 +1,5 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Luca Boccassi <[email protected]>
 
-deps += ['bbdev', 'bus_vdev', 'ring']
+deps += ['bus_vdev', 'ring']
 sources = files('bbdev_null.c')
drivers/baseband/turbo_sw/meson.build +1 -1
index aeb9a76f9e..a9035a753e 100644
@@ -26,5 +26,5 @@ if dep_dec5g.found()
     cflags += ['-DRTE_BBDEV_SDK_AVX512']
 endif
 
-deps += ['bbdev', 'bus_vdev', 'ring']
+deps += ['bus_vdev', 'ring']
 sources = files('bbdev_turbo_software.c')
drivers/gpu/cuda/meson.build +1 -1
index 784fa8bf0d..d54473f148 100644
@@ -21,5 +21,5 @@ if cc.has_header('gdrapi.h')
         dpdk_conf.set('DRIVERS_GPU_CUDA_GDRCOPY_H', 1)
 endif
 
-deps += ['gpudev', 'pci', 'bus_pci']
+deps += ['pci', 'bus_pci']
 sources = files('cuda.c', 'gdrcopy.c')
drivers/gpu/meson.build +2 -0
index 601bedcd61..b6edd12678 100644
@@ -2,3 +2,5 @@
 # Copyright (c) 2021 NVIDIA Corporation & Affiliates
 
 drivers = [ 'cuda' ]
+
+std_deps = [ 'gpudev' ]
drivers/regex/cn9k/meson.build +1 -1
index 44b12b9845..b22275928a 100644
@@ -12,5 +12,5 @@ sources = files(
         'cn9k_regexdev.c',
 )
 
-deps += ['bus_pci', 'regexdev']
+deps += ['bus_pci']
 deps += ['common_cnxk', 'mempool_cnxk']
drivers/regex/meson.build +1 -1
index 7ad55af8ca..ff2a8fea89 100644
@@ -5,4 +5,4 @@ drivers = [
         'mlx5',
         'cn9k',
 ]
-std_deps = ['ethdev', 'kvargs'] # 'ethdev' also pulls in mbuf, net, eal etc
+std_deps = ['ethdev', 'kvargs', 'regexdev'] # 'ethdev' also pulls in mbuf, net, eal etc
drivers/regex/mlx5/meson.build +1 -1
index 0f4ca46f44..6070b37501 100644
@@ -7,7 +7,7 @@ if not is_linux
     subdir_done()
 endif
 
-deps += ['common_mlx5', 'eal', 'regexdev']
+deps += ['common_mlx5', 'eal']
 if not dpdk_conf.has('RTE_COMMON_MLX5')
     # avoid referencing undefined variables from common/mlx5
     subdir_done()
Signature · 1 line
2.41.0
Acked-by on v1 1/1
#1 lore raw
Quoted 5 lines · David Marchand

A few classes meson.build were not expressing dependencies to the associated device library. Define std_deps for baseband, gpu and regex drivers.

Quoted 15 lines
---
 drivers/baseband/acc/meson.build           | 2 +-
 drivers/baseband/fpga_5gnr_fec/meson.build | 2 +-
 drivers/baseband/fpga_lte_fec/meson.build  | 2 +-
 drivers/baseband/la12xx/meson.build        | 2 +-
 drivers/baseband/meson.build               | 2 ++
 drivers/baseband/null/meson.build          | 2 +-
 drivers/baseband/turbo_sw/meson.build      | 2 +-
 drivers/gpu/cuda/meson.build               | 2 +-
 drivers/gpu/meson.build                    | 2 ++
 drivers/regex/cn9k/meson.build             | 2 +-
 drivers/regex/meson.build                  | 2 +-
 drivers/regex/mlx5/meson.build             | 2 +-
 12 files changed, 14 insertions(+), 10 deletions(-)
Acked-by on v1 1/1
#2 lore raw
In reply to David Marchand
Quoted 9 lines

From: David Marchand [mailto:[email protected]]
Sent: Friday, 25 August 2023 19.03

A few classes meson.build were not expressing dependencies to the associated device library. Define std_deps for baseband, gpu and regex drivers.

---

On the surface, it looks like you are also removing a lot of (superfluous) dependencies. If not just a side effect of the added std_deps, perhaps the patch description should mention this too.

Anyway,

#3 lore raw
Quoted 4 lines · Morten Brørup
Quoted 4 lines

From: David Marchand [mailto:[email protected]]
Sent: Friday, 25 August 2023 19.03

Quoted 8 lines
Quoted 6 lines

A few classes meson.build were not expressing dependencies to the associated device library. Define std_deps for baseband, gpu and regex drivers.

---

On the surface, it looks like you are also removing a lot of (superfluous) dependencies. If not just a side effect of the added std_deps, perhaps the patch description should mention this too.

The dependency to the device library in a driver become superfluous as a result of adding it to std_deps:
- std_deps is passed to drivers as the default deps:
https://git.dpdk.org/dpdk/tree/drivers/meson.build#n125
- none of those updated drivers meson.build was overriding/resetting deps (grep -w deps $patch).

I'll add a note in the commitlog to make this explicit.

Quoted 5 lines

Anyway,

Thanks.

Signature · 1 line
David Marchand
Acked-by on v1 1/1
#4 lore raw
In reply to David Marchand
Quoted 5 lines · David Marchand

A few classes meson.build were not expressing dependencies to the associated device library. Define std_deps for baseband, gpu and regex drivers.

Quoted 15 lines
---
  drivers/baseband/acc/meson.build           | 2 +-
  drivers/baseband/fpga_5gnr_fec/meson.build | 2 +-
  drivers/baseband/fpga_lte_fec/meson.build  | 2 +-
  drivers/baseband/la12xx/meson.build        | 2 +-
  drivers/baseband/meson.build               | 2 ++
  drivers/baseband/null/meson.build          | 2 +-
  drivers/baseband/turbo_sw/meson.build      | 2 +-
  drivers/gpu/cuda/meson.build               | 2 +-
  drivers/gpu/meson.build                    | 2 ++
  drivers/regex/cn9k/meson.build             | 2 +-
  drivers/regex/meson.build                  | 2 +-
  drivers/regex/mlx5/meson.build             | 2 +-
  12 files changed, 14 insertions(+), 10 deletions(-)