On 06/01/2025 11:09, Roi Dayan via dev wrote:
> From: Eli Britstein <[email protected]>
> 
> New appctl 'dpdk/get-memzone-stats' implemented to get result of
> 'rte_memzone_dump()' function.
> 
> Could be used for debugging.
> 
> Signed-off-by: Eli Britstein <[email protected]>
> Acked-by: Roi Dayan <[email protected]>
> ---
>  lib/dpdk.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 

Hi Roi,

Code LGTM. It needs an update to dpdk-unixctl.man and NEWS so users can
see it's added.

See Eli's previous commit as example:
https://github.com/openvswitch/ovs/commit/ad256c31407d347eb185b39cb8fefc9df607e3ed

(it also needs a small rebase without mempool-stats patch)

thanks,
Kevin.

> diff --git a/lib/dpdk.c b/lib/dpdk.c
> index aaf0b2ed8046..b585327ea971 100644
> --- a/lib/dpdk.c
> +++ b/lib/dpdk.c
> @@ -324,6 +324,12 @@ malloc_dump_mempool_stats_wrapper(FILE *stream)
>      rte_mempool_walk(dump_mempool_stats, stream);
>  }
>  
> +static void
> +malloc_dump_memzone_stats_wrapper(FILE *stream)
> +{
> +    rte_memzone_dump(stream);
> +}
> +
>  static bool
>  dpdk_init__(const struct smap *ovs_other_config)
>  {
> @@ -454,6 +460,9 @@ dpdk_init__(const struct smap *ovs_other_config)
>      unixctl_command_register("dpdk/get-mempool-stats", "", 0, 0,
>                               dpdk_unixctl_mem_stream,
>                               malloc_dump_mempool_stats_wrapper);
> +    unixctl_command_register("dpdk/get-memzone-stats", "", 0, 0,
> +                             dpdk_unixctl_mem_stream,
> +                             malloc_dump_memzone_stats_wrapper);
>  
>      /* We are called from the main thread here */
>      RTE_PER_LCORE(_lcore_id) = NON_PMD_CORE_ID;

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

Reply via email to