On Thu, 11 Sept 2025 at 15:33, Kevin Traynor <[email protected]> wrote:
>
> OVS currently uses other_config:dpdk-lcore-mask <coremask> directly
> in DPDK rte_eal_init() with '-c <coremask>' argument.
>
> '-c' argument is now deprecated from DPDK and will be removed in
> DPDK 25.11, so OVS will no longer be able to use the '-c <coremask>'
> argument.
>
> Convert dpdk-lcore-mask core mask to a core list that can be used with
> '--lcores' and add some tests.
>
> The core list is validated to prevent invalid cores being passed to
> DPDK rte_eal_init().
>
> Using the '--lcores' argument also adds compability for using a core
> in the core mask that is greater than the max lcore, similar to commit
> fe53b478f86e ("dpdk: Fix main lcore on systems with many cores.")
>
> Signed-off-by: Kevin Traynor <[email protected]>
> ---
>  lib/dpdk.c           | 78 +++++++++++++++++++++++++++++++++++++++++---
>  tests/ovs-macros.at  | 16 +++++++++
>  tests/pmd.at         | 15 ---------
>  tests/system-dpdk.at | 72 ++++++++++++++++++++++++++++++++++++++++
>  4 files changed, 162 insertions(+), 19 deletions(-)
>
> diff --git a/lib/dpdk.c b/lib/dpdk.c
> index a6f82dd8a..4df480fde 100644
> --- a/lib/dpdk.c
> +++ b/lib/dpdk.c
> @@ -65,4 +65,60 @@ args_contains(const struct svec *args, const char *value)
>  }
>
> +static int
> +compare_core_ids(const void *a_, const void *b_)
> +{
> +    const unsigned *a = a_;
> +    const unsigned *b = b_;

Nit: explicit unsigned int?


> +
> +    return *a < *b ? -1 : *a > *b;
> +}
> +

The lgtm.

Reviewed-by: David Marchand <[email protected]>

-- 
David Marchand

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to