[PATCH v3] app/procinfo: display eventdev xstats for PMD data

Sevincer, Abdullah abdullah.sevincer at intel.com
Wed Feb 22 02:54:23 CET 2023


Got it. Looking at forums and made some reading, like you said it does not matter much.
I will keep consistency with other call methods so keep malloc.

I will push another patch removing extra line.

Thanks.

-----Original Message-----
From: Stephen Hemminger <stephen at networkplumber.org> 
Sent: Friday, February 17, 2023 8:33 AM
To: Sevincer, Abdullah <abdullah.sevincer at intel.com>
Cc: dev at dpdk.org; jerinj at marvell.com
Subject: Re: [PATCH v3] app/procinfo: display eventdev xstats for PMD data

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