Re: [Cryptodev-linux-devel] [PATCH] Fix compilation against linux 4.3

2015-11-27 Thread Phil Sutter
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Thu, Nov 19, 2015 at 12:05:51PM -0300, Gustavo Zacarias wrote:
> Linux Crypto API changed to using aead_request_set_ad()
> instead of aead_request_set_assoc().
> 
> Based on Horia Geantă's patch from
> https://mail.gna.org/public/cryptodev-linux-devel/2015-11/msg2.html
> 
> However we need to version-guard the change for older versions of the
> kernel to avoid the build from breaking for them.
> 
> Tested with 4.3 on a p1010rdb.
> 
> Signed-off-by: Gustavo Zacarias 

Applied, thanks!
-BEGIN PGP SIGNATURE-
Version: GnuPG v2

iEYEARECAAYFAlZY/D8ACgkQnMPprxY1hCeCiQCeJDxtVjjjmqnoZAw7Hh0C6gDw
wtoAnR+uWNxXU6hROWti2K9+JA1Z5igL
=lJnt
-END PGP SIGNATURE-

___
Cryptodev-linux-devel mailing list
Cryptodev-linux-devel@gna.org
https://mail.gna.org/listinfo/cryptodev-linux-devel


Re: [Cryptodev-linux-devel] [PATCH] Fix compilation against linux 4.3

2015-11-23 Thread Horia Geantă
On 11/19/2015 5:05 PM, Gustavo Zacarias wrote:
> Linux Crypto API changed to using aead_request_set_ad()
> instead of aead_request_set_assoc().
> 
> Based on Horia Geantă's patch from
> https://mail.gna.org/public/cryptodev-linux-devel/2015-11/msg2.html
> 
> However we need to version-guard the change for older versions of the
> kernel to avoid the build from breaking for them.
> 
> Tested with 4.3 on a p1010rdb.
> 
> Signed-off-by: Gustavo Zacarias 

Reviewed-by: Horia Geantă 

Thanks,
Horia


___
Cryptodev-linux-devel mailing list
Cryptodev-linux-devel@gna.org
https://mail.gna.org/listinfo/cryptodev-linux-devel


Re: [Cryptodev-linux-devel] [PATCH] fix compilation against linux-4.3

2015-11-19 Thread Gustavo Zacarias

On 11/11/15 09:36, Horia Geantă wrote:


Linux Crypto API changed to using aead_request_set_ad()
instead of aead_request_set_assoc().

Signed-off-by: Horia Geantă 
---

Compile-tested only.

  cryptlib.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cryptlib.h b/cryptlib.h
index a0a8a63e2ff3..0c2009286e31 100644
--- a/cryptlib.h
+++ b/cryptlib.h
@@ -40,7 +40,7 @@ static inline void cryptodev_cipher_auth(struct cipher_data 
*cdata,
 struct scatterlist *sg1, size_t len)
  {
/* for some reason we _have_ to call that even for zero length sgs */
-   aead_request_set_assoc(cdata->async.arequest, len ? sg1 : NULL, len);
+   aead_request_set_ad(cdata->async.arequest, len);
  }

  static inline void cryptodev_cipher_set_tag_size(struct cipher_data *cdata, 
int size)



Hi Horia.
This works, however it breaks builds on older kernels (<4.2 i believe), 
so i've sent a revised version.

Thanks.
Regards.

___
Cryptodev-linux-devel mailing list
Cryptodev-linux-devel@gna.org
https://mail.gna.org/listinfo/cryptodev-linux-devel