[PATCH v3] app/procinfo: display eventdev xstats for PMD data
Stephen Hemminger
stephen at networkplumber.org
Fri Feb 17 17:33:23 CET 2023
On Fri, 17 Feb 2023 15:58:52 +0000
"Sevincer, Abdullah" <abdullah.sevincer at intel.com> wrote:
> From: Sevincer, Abdullah <abdullah.sevincer at intel.com>
> Sent: Sunday, February 12, 2023 11:44 AM
> To: Stephen Hemminger <stephen at networkplumber.org>
> Cc: dev at dpdk.org; jerinj at marvell.com
> Subject: RE: [PATCH v3] app/procinfo: display eventdev xstats for PMD data
>
> Thanks Stephen,
> I will remove extra line there.
>
> Instead malloc using of calloc is required or just suggestion?
> I can see allocation is done in same way with malloc in lib\eventdev\rte_eventdev.c (reference to eventdev_build_telemetry_data function).
> I will keep malloc as it is if there is no opposition.
It doesn't matter much if you use malloc vs calloc.
But there are some static analysis tools that might look at calloc as way to determine
number of elememts for later array checks.
Also, the kernel checkpatch warns when kmalloc is used but kcalloc or kmalloc_array
could be used instead. That is Linux kernel specific but same idea applies.
More information about the dev
mailing list