[PATCH v2 2/2] build: prevent accidentally building without NUMA support

Bruce Richardson bruce.richardson at intel.com
Mon Jun 12 19:59:10 CEST 2023


On Mon, Jun 12, 2023 at 06:14:56PM +0100, Bruce Richardson wrote:
> When libnuma development package is missing on a system, DPDK can still
> be built but will be missing much-needed support for NUMA memory
> management. This may later cause issues at runtime if the resulting
> binary is run on a NUMA system.
> 
> We can reduce the incidence of such runtime error by ensuring that, for
> native builds*, libnuma is present - unless the user actually specifies
> via "max_numa_nodes" that they don't require NUMA support. Having this
> as an error condition is also in keeping with what is documented in the
> Linux GSG doc, where libnuma is listed as a requirement for building
> DPDK [1].
> 
> * NOTE: cross-compilation builds have a different logic set, with a
>   separate "numa" value indicating if numa support is necessary.
> 
> [1] https://doc.dpdk.org/guides-23.03/linux_gsg/sys_reqs.html
> 
> Signed-off-by: Bruce Richardson <bruce.richardson at intel.com>
> 
> ---
> V2: Limit check to linux only
> ---
>  config/meson.build | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
I see this patch has failures reported in the CI, due to some of the
systems not having libnuma installed. I'd view that as a false positive,
since libnuma is effectively a mandatory requirement for building DPDK to
run on most systems. [And this patch still provides a way to build without
it - that way just has to be selected deliberately, rather than it being chosen
by default, without the user being aware of the omission.]

Regards,
/Bruce


More information about the dev mailing list