>-----Original Message-----
>From: De Lara Guarch, Pablo [mailto:[email protected]]
>Sent: 20 June 2018 03:45
>To: Verma, Shally <[email protected]>
>Cc: Trahe, Fiona <[email protected]>; [email protected]; Athreya, Narayana 
>Prasad <[email protected]>;
>Challa, Mahipal <[email protected]>; Gupta, Ashish 
><[email protected]>; Sahu, Sunila
><[email protected]>
>Subject: RE: [PATCH v1 2/7] compress/octeontx: add device setup PMD ops
>
>External Email
>
>> -----Original Message-----
>> From: Shally Verma [mailto:[email protected]]
>> Sent: Tuesday, June 5, 2018 11:35 AM
>> To: De Lara Guarch, Pablo <[email protected]>
>> Cc: Trahe, Fiona <[email protected]>; [email protected];
>> [email protected]; [email protected]; Ashish Gupta
>> <[email protected]>; Sunila Sahu
>> <[email protected]>
>> 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 <[email protected]>
>> Signed-off-by: Shally Verma <[email protected]>
>> Signed-off-by: Sunila Sahu <[email protected]>
>> ---
>>  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;
>> +}
>> +
>>

Reply via email to