[PATCH 2/3] eal: uninline rte_str_to_size

Morten Brørup mb at smartsharesystems.com
Mon Aug 22 09:24:47 CEST 2022


> From: Dmitry Kozlyuk [mailto:dmitry.kozliuk at gmail.com]
> Sent: Sunday, 21 August 2022 22.50
> To: dev at dpdk.org
> Cc: Dmitry Kozlyuk; Ray Kinsella
> Subject: [PATCH 2/3] eal: uninline rte_str_to_size
> 
> There is no reason for rte_str_to_size() to be inline.
> Move the implementation out of <rte_common.h>.
> Export it as a stable ABI because it always has been public.
> 
> Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk at gmail.com>

Acked-by: Morten Brørup <mb at smartsharesystems.com>

> ---
> Now <rte_common.h> doesn't need to #include <ctypes.h> and <stdlib.h>,
> but removing them breaks some DPDK code, may break user code too.
> I'm not sure what is the compatibility policy in this regard.
> If such a breakage is allowed, I'd remove includes and fix DPDK code.
> 

The question I'm asking myself here is: Do we want rte_common.h to include common headers like these, just so we don't need to include them elsewhere? I think not.

I'm in favor of the principle of keeping it clean: Remove them from rte_common.h, and deal with the consequences.

If we keep them, we will forget why they are there, and some day in the future, someone will ask what these unused headers are doing in <rte_common.h>.



More information about the dev mailing list