esp: Don't require synchronous crypto fallback on offloading anymore.
authorSteffen Klassert <steffen.klassert@secunet.com>
Wed, 20 Dec 2017 09:41:53 +0000 (10:41 +0100)
committerSteffen Klassert <steffen.klassert@secunet.com>
Wed, 20 Dec 2017 09:41:53 +0000 (10:41 +0100)
We support asynchronous crypto on layer 2 ESP now.
So no need to force synchronous crypto fallback on
offloading anymore.

Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
net/ipv4/esp4.c
net/ipv6/esp6.c

index 7948833dc204b2a856edb66a32f23b3c7b750c7c..6f00e43120a86028c91f71bf710c643c0bd8470c 100644 (file)
@@ -843,17 +843,13 @@ static int esp_init_aead(struct xfrm_state *x)
        char aead_name[CRYPTO_MAX_ALG_NAME];
        struct crypto_aead *aead;
        int err;
-       u32 mask = 0;
 
        err = -ENAMETOOLONG;
        if (snprintf(aead_name, CRYPTO_MAX_ALG_NAME, "%s(%s)",
                     x->geniv, x->aead->alg_name) >= CRYPTO_MAX_ALG_NAME)
                goto error;
 
-       if (x->xso.offload_handle)
-               mask |= CRYPTO_ALG_ASYNC;
-
-       aead = crypto_alloc_aead(aead_name, 0, mask);
+       aead = crypto_alloc_aead(aead_name, 0, 0);
        err = PTR_ERR(aead);
        if (IS_ERR(aead))
                goto error;
@@ -883,7 +879,6 @@ static int esp_init_authenc(struct xfrm_state *x)
        char authenc_name[CRYPTO_MAX_ALG_NAME];
        unsigned int keylen;
        int err;
-       u32 mask = 0;
 
        err = -EINVAL;
        if (!x->ealg)
@@ -909,10 +904,7 @@ static int esp_init_authenc(struct xfrm_state *x)
                        goto error;
        }
 
-       if (x->xso.offload_handle)
-               mask |= CRYPTO_ALG_ASYNC;
-
-       aead = crypto_alloc_aead(authenc_name, 0, mask);
+       aead = crypto_alloc_aead(authenc_name, 0, 0);
        err = PTR_ERR(aead);
        if (IS_ERR(aead))
                goto error;
index 08a424fa800942f401c00ee2a28bd4a87d1976bd..7c888c6e53a97fdec1e1f0fa6f7800f08888fbf0 100644 (file)
@@ -752,17 +752,13 @@ static int esp_init_aead(struct xfrm_state *x)
        char aead_name[CRYPTO_MAX_ALG_NAME];
        struct crypto_aead *aead;
        int err;
-       u32 mask = 0;
 
        err = -ENAMETOOLONG;
        if (snprintf(aead_name, CRYPTO_MAX_ALG_NAME, "%s(%s)",
                     x->geniv, x->aead->alg_name) >= CRYPTO_MAX_ALG_NAME)
                goto error;
 
-       if (x->xso.offload_handle)
-               mask |= CRYPTO_ALG_ASYNC;
-
-       aead = crypto_alloc_aead(aead_name, 0, mask);
+       aead = crypto_alloc_aead(aead_name, 0, 0);
        err = PTR_ERR(aead);
        if (IS_ERR(aead))
                goto error;
@@ -792,7 +788,6 @@ static int esp_init_authenc(struct xfrm_state *x)
        char authenc_name[CRYPTO_MAX_ALG_NAME];
        unsigned int keylen;
        int err;
-       u32 mask = 0;
 
        err = -EINVAL;
        if (!x->ealg)
@@ -818,10 +813,7 @@ static int esp_init_authenc(struct xfrm_state *x)
                        goto error;
        }
 
-       if (x->xso.offload_handle)
-               mask |= CRYPTO_ALG_ASYNC;
-
-       aead = crypto_alloc_aead(authenc_name, 0, mask);
+       aead = crypto_alloc_aead(authenc_name, 0, 0);
        err = PTR_ERR(aead);
        if (IS_ERR(aead))
                goto error;