mbox

[v4,0/9] expand list of optional libraries

Message ID 20230623150708.2203918-1-bruce.richardson@intel.com (mailing list archive)
Headers

Message

Bruce Richardson June 23, 2023, 3:06 p.m. UTC
  DPDK still has many libraries which cannot be disabled as part of a
build. With the ongoing work to make it easier to only build a subset
of the libraries in DPDK, we can also work to expand the list of
libraries which can be enabled/disabled as desired.

This patch addresses a number of the "low-hanging fruit" libraries,
where only the unit test builds need minor changes to support
making the library optional. The rest of the build system is already
well set up for selective disabling of libraries.

For better support of enabling components, especially those more
integrated into DPDK unit tests, rework of the test meson.build file
is likely needed. For example, it could probably be better rewritten
to use a dictionary of files and the dependencies of each file, and
the unit test commands each provides. However, such rework is a
significant effort, and outside the scope of this patchset.

V4:
- fix more issues with disabling eventdev:
  * ensure dlb2 driver doesn't directly reference the static lib
  * ensure l3fwd can be built using makefiles without eventdev
  * remove dependency on eventdev for unit tests like pdump that
    don't actually need it.

V3:
- rebase on top of main.
- make eventdev an optional dependency of l3fwd
- Fix incorrect define reference - RTE_LIB_IP_FRAG vs RTE_IP_FRAG

V2: fix checkpatch issues, since checkpatch doesn't like empty commit
    messages (even if the title is pretty self-explanatory!)

Bruce Richardson (9):
  examples/l3fwd: make eventdev an optional dependency
  event/dlb2: skip configuration if no eventdev lib
  build: make most device classes optional
  build: make membership library optional
  build: make bpf library optional
  build: make efd library optional
  build: make distributor library optional
  build: make fragmentation library optional
  build: make reorder library optional

 app/test/meson.build                       | 89 +++++++++++++---------
 drivers/event/dlb2/meson.build             |  2 +-
 examples/l3fwd/l3fwd_em.c                  |  2 +
 examples/l3fwd/l3fwd_em_hlm.h              |  2 +
 examples/l3fwd/l3fwd_event.c               |  2 +
 examples/l3fwd/l3fwd_event.h               |  7 +-
 examples/l3fwd/l3fwd_event_generic.c       |  2 +
 examples/l3fwd/l3fwd_event_internal_port.c |  2 +
 examples/l3fwd/l3fwd_fib.c                 |  2 +
 examples/l3fwd/l3fwd_lpm.c                 |  2 +
 examples/l3fwd/main.c                      | 65 ++++++++++++----
 examples/l3fwd/meson.build                 |  5 +-
 lib/meson.build                            | 13 ++++
 13 files changed, 143 insertions(+), 52 deletions(-)

--
2.39.2
  

Comments

Bruce Richardson Aug. 14, 2023, 3:10 p.m. UTC | #1
On Fri, Jun 23, 2023 at 04:06:59PM +0100, Bruce Richardson wrote:
> DPDK still has many libraries which cannot be disabled as part of a
> build. With the ongoing work to make it easier to only build a subset
> of the libraries in DPDK, we can also work to expand the list of
> libraries which can be enabled/disabled as desired.
> 
> This patch addresses a number of the "low-hanging fruit" libraries,
> where only the unit test builds need minor changes to support
> making the library optional. The rest of the build system is already
> well set up for selective disabling of libraries.
> 
> For better support of enabling components, especially those more
> integrated into DPDK unit tests, rework of the test meson.build file
> is likely needed. For example, it could probably be better rewritten
> to use a dictionary of files and the dependencies of each file, and
> the unit test commands each provides. However, such rework is a
> significant effort, and outside the scope of this patchset.
> 
> V4:
> - fix more issues with disabling eventdev:
>   * ensure dlb2 driver doesn't directly reference the static lib
>   * ensure l3fwd can be built using makefiles without eventdev
>   * remove dependency on eventdev for unit tests like pdump that
>     don't actually need it.
> 
This patch series I'm closing off, and merging in with my patch series to
improve the unit test builds. With the unit test build set applied, most of
the patches in this set just become single-line changes to the optional
list, so just adding them to the end of the test cleanup set makes sense.

/Bruce