[dpdk-dev] [PATCH v2 1/5] compress/zlib: add ZLIB PMD support

Verma, Shally Shally.Verma at cavium.com
Wed Jul 11 14:40:58 CEST 2018


Hi Pablo

>-----Original Message-----
>From: De Lara Guarch, Pablo [mailto:pablo.de.lara.guarch at intel.com]
>Sent: 11 July 2018 17:44
>To: Verma, Shally <Shally.Verma at cavium.com>
>Cc: dev at dpdk.org; Athreya, Narayana Prasad <NarayanaPrasad.Athreya at cavium.com>; Challa, Mahipal
><Mahipal.Challa at cavium.com>; Gupta, Ashish <Ashish.Gupta at cavium.com>; Sahu, Sunila <Sunila.Sahu at cavium.com>
>Subject: RE: [PATCH v2 1/5] compress/zlib: add ZLIB PMD support
>
>External Email
>
>And the last comments, sorry for the multiple replies.

No issues.

>
>> -----Original Message-----
>> From: Shally Verma [mailto:shally.verma at caviumnetworks.com]
>> Sent: Monday, July 2, 2018 5:57 PM
>> To: De Lara Guarch, Pablo <pablo.de.lara.guarch at intel.com>
>> Cc: dev at dpdk.org; pathreya at caviumnetworks.com;
>> mchalla at caviumnetworks.com; Ashish Gupta
>> <ashish.gupta at caviumnetworks.com>; Sunila Sahu
>> <sunila.sahu at caviumnetworks.com>
>> Subject: [PATCH v2 1/5] compress/zlib: add ZLIB PMD support
>>
>> From: Ashish Gupta <ashish.gupta at caviumnetworks.com>
>>
>> Add sw zlib pmd support in compressdev driver.
>> Add device probe and remove support.
>> Add ZLIB build file support.
>>
>> Signed-off-by: Sunila Sahu <sunila.sahu at caviumnetworks.com>
>> Signed-off-by: Shally Verma <shally.verma at caviumnetworks.com>
>> Signed-off-by: Ashish Gupta <ashish.gupta at caviumnetworks.com>
>
>...
>
>> +++ b/drivers/compress/zlib/zlib_pmd.c
>
>...
>
>> +static void
>> +zlib_init_log(void)
>> +{
>> +     zlib_logtype_driver = rte_log_register("compress_zlib");
>
>The standard for the name of the logtype for PMDs is "pmd.driverType.driverName",
>so in this case it would be "pmd.compress.zlib".
>
>
>> +     if (zlib_logtype_driver >= 0)
>> +             rte_log_set_level(zlib_logtype_driver, RTE_LOG_INFO); }
>> diff --git a/drivers/compress/zlib/zlib_pmd_private.h
>> b/drivers/compress/zlib/zlib_pmd_private.h
>> new file mode 100644
>> index 0000000..d4c80b1
>> --- /dev/null
>> +++ b/drivers/compress/zlib/zlib_pmd_private.h
>
>...
>
>> +#define ZLIB_PMD_INFO(fmt, args...) \
>> +     ZLIB_PMD_LOG(INFO, fmt, ## args)
>> +#define ZLIB_PMD_ERR(fmt, args...) \
>> +     ZLIB_PMD_LOG(ERR, fmt, ## args)
>> +#define ZLIB_PMD_WARN(fmt, args...) \
>> +     ZLIB_PMD_LOG(WARNING, fmt, ## args)
>
>What do you think of having a single macro ZLIB_LOG(level, fmt, args...)?
>
I find it simpler to use ZLIB_PMD_INFO/ERR?DEBUG version . So would prefer to stick to them.

Thanks for review.
Shally




More information about the dev mailing list