> -----Original Message----- > From: Antoine Tenart <antoine.tenart@xxxxxxxxxxx> > Sent: Wednesday, September 11, 2019 5:45 PM > To: Pascal Van Leeuwen <pvanleeuwen@xxxxxxxxxxxxxx> > Cc: Antoine Tenart <antoine.tenart@xxxxxxxxxxx>; Pascal van Leeuwen > <pascalvanl@xxxxxxxxx>; linux-crypto@xxxxxxxxxxxxxxx; herbert@xxxxxxxxxxxxxxxxxxx; > davem@xxxxxxxxxxxxx > Subject: Re: [PATCH 2/2] crypto: inside-secure - Add support for the Chacha20-Poly1305 > AEAD > > On Wed, Sep 11, 2019 at 03:37:25PM +0000, Pascal Van Leeuwen wrote: > > > On Tue, Sep 10, 2019 at 04:38:13PM +0200, Pascal van Leeuwen wrote: > > > > @@ -43,8 +44,8 @@ struct safexcel_cipher_ctx { > > > > > > > > u32 mode; > > > > enum safexcel_cipher_alg alg; > > > > - bool aead; > > > > - int xcm; /* 0=authenc, 1=GCM, 2 reserved for CCM */ > > > > + char aead; /* !=0=AEAD, 2=IPSec ESP AEAD */ > > > > + char xcm; /* 0=authenc, 1=GCM, 2 reserved for CCM */ > > > > > > You could use an u8 instead. It also seems the aead comment has an > > > issue, I'll let you check that. > > > > > I don't see what's wrong with the comment though? > > Anything unequal to 0 is AEAD, with value 2 being the ESP variant. > > OK, that wasn't clear to me when I first read it. Maybe you could say > that 1: AEAD, 2: IPsec ESP AEAD; and then of course the check of this > value being > 0 would mean it's one of the two. > OK, agree that that's clearer so I will change it to that. > Thanks! > Antoine > > -- > Antoine Ténart, Bootlin > Embedded Linux and Kernel engineering > https://bootlin.com Regards, Pascal van Leeuwen Silicon IP Architect, Multi-Protocol Engines @ Verimatrix www.insidesecure.com