Hi Aviad,

> -----Original Message-----
> From: Aviad Yehezkel [mailto:[email protected]]
> Sent: Sunday, October 15, 2017 1:54 PM
> To: [email protected]; Gonzalez Monroy, Sergio
> <[email protected]>; De Lara Guarch, Pablo
> <[email protected]>; [email protected]
> Cc: [email protected]; [email protected];
> [email protected]; Nicolau, Radu <[email protected]>;
> Doherty, Declan <[email protected]>; [email protected];
> [email protected]; [email protected]
> Subject: Re: [dpdk-dev][PATCH 02/11] examples/ipsec-secgw: Fixed init of
> aead crypto devices
> 

Commit titles should start with infinitive and not with lowercase.
e.g. examples/ipsec-secgw: fix init of aead crypto devices

Also, since this is a fix, you should include a Fixes line with the commit id
where the issues was introduced, and CC stable, if the issue was not introduced 
in the current release.

Take a look at the following document, that explains in detail the contribution 
guidelines:
http://dpdk.org/doc/guides/contributing/patches.html

Also, I have a comment below.

Thanks,
Pablo


> 
> 
> On 10/14/2017 4:27 PM, [email protected] wrote:
> > From: Aviad Yehezkel <[email protected]>
> >
> > This was broken since new aead xfrom was introduced
> >
> > Signed-off-by: Aviad Yehezkel <[email protected]>

...

> >     if (ret != -ENOENT)
> > @@ -1192,19 +1195,25 @@ add_cdev_mapping(struct
> rte_cryptodev_info *dev_info, uint16_t cdev_id,
> >             if (i->op != RTE_CRYPTO_OP_TYPE_SYMMETRIC)
> >                     continue;
> >


I think it is simpler to leave the code as it is, and add:

+               if (i->sym.xform_type == RTE_CRYPTO_SYM_XFORM_AEAD) {
+                       ret |= add_mapping(map, str, cdev_id, qp, params,
+                                       ipsec_ctx, NULL, NULL, i);
+                       continue;
+               }

And just add NULL in the existing add_mapping() function, without modifying the 
for loop.
The other changes were OK to me.

> > -           if (i->sym.xform_type !=
> RTE_CRYPTO_SYM_XFORM_CIPHER)
> > +           if (i->sym.xform_type == RTE_CRYPTO_SYM_XFORM_AEAD)
> {
> > +                   ret |= add_mapping(map, str, cdev_id, qp, params,
> > +                                   ipsec_ctx, NULL, NULL, i);
> >                     continue;
> > +           }

Reply via email to