[dpdk-dev] [PATCH v1 2/7] compress/octeontx: add device setup PMD ops

Verma, Shally Shally.Verma at cavium.com
Wed Jun 20 08:04:52 CEST 2018



>-----Original Message-----
>From: De Lara Guarch, Pablo [mailto:pablo.de.lara.guarch at intel.com]
>Sent: 20 June 2018 03:45
>To: Verma, Shally <Shally.Verma at cavium.com>
>Cc: Trahe, Fiona <fiona.trahe at intel.com>; 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 v1 2/7] compress/octeontx: add device setup PMD ops
>
>External Email
>
>> -----Original Message-----
>> From: Shally Verma [mailto:shally.verma at caviumnetworks.com]
>> Sent: Tuesday, June 5, 2018 11:35 AM
>> To: De Lara Guarch, Pablo <pablo.de.lara.guarch at intel.com>
>> Cc: Trahe, Fiona <fiona.trahe at intel.com>; 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 v1 2/7] compress/octeontx: add device setup PMD ops
>>
>> implement device configure and PMD ops.
>> setup stream resource memory pool
>> setup and enable hardware queue
>>
>> Signed-off-by: Ashish Gupta <ashish.gupta at caviumnetworks.com>
>> Signed-off-by: Shally Verma <shally.verma at caviumnetworks.com>
>> Signed-off-by: Sunila Sahu <sunila.sahu at caviumnetworks.com>
>> ---
>>  drivers/compress/octeontx/include/zip_regs.h | 721
>> +++++++++++++++++++++++++++
>>  drivers/compress/octeontx/zip_pmd.c          | 269 ++++++++++
>>  drivers/compress/octeontx/zipvf.c            |  81 +++
>>  drivers/compress/octeontx/zipvf.h            | 103 ++++
>>  4 files changed, 1174 insertions(+)
>
>..
>
>> diff --git a/drivers/compress/octeontx/zip_pmd.c
>> b/drivers/compress/octeontx/zip_pmd.c
>> index 1181bed19..3bb7f6896 100644
>> --- a/drivers/compress/octeontx/zip_pmd.c
>> +++ b/drivers/compress/octeontx/zip_pmd.c
>...
>
>> +
>> +/** Start device */
>> +static int
>> +zip_pmd_start(struct rte_compressdev *dev) {
>> +     if (dev == NULL)
>> +             return -1;
>> +     return 0;
>> +}
>
>Dev cannot be NULL at this stage, so no need to have this check.
>
>> +
>> +/** Stop device */
>> +static void
>> +zip_pmd_stop(__rte_unused struct rte_compressdev *dev) {
>> +
>> +}
>> +
>> +/** Close device */
>> +static int
>> +zip_pmd_close(struct rte_compressdev *dev) {
>> +     if (dev == NULL)
>> +             return -1;
>
>Same as above.
>
>> +
>> +     struct zip_vf *vf = (struct zip_vf *)dev->data->dev_private;
>> +
>> +     for (int i = 0; dev->data->nb_queue_pairs; i++) {
>> +             if (dev->data->queue_pairs[i] != NULL)
>> +             /* qp not released, return error */
>> +             return -1;
>
>All queue pairs should be released at this point, so not sure this check is required.
>If it is, don't forget the indentation.
>
[Shally] Ack to all. 

Thanks for review.
Shally
>> +     }
>> +
>> +     rte_mempool_free(vf->zip_mp);
>> +     return 0;
>> +}
>> +
>>



More information about the dev mailing list