mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07:00
xfrm: ipcomp: Use crypto_acomp interface
Replace the legacy comperssion interface with the new acomp interface. This is the first user to make full user of the asynchronous nature of acomp by plugging into the existing xfrm resume interface. As a result of SG support by acomp, the linear scratch buffer in ipcomp can be removed. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
+1
-12
@@ -3,20 +3,9 @@
|
||||
#define _NET_IPCOMP_H
|
||||
|
||||
#include <linux/skbuff.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
#define IPCOMP_SCRATCH_SIZE 65400
|
||||
|
||||
struct crypto_comp;
|
||||
struct ip_comp_hdr;
|
||||
|
||||
struct ipcomp_data {
|
||||
u16 threshold;
|
||||
struct crypto_comp * __percpu *tfms;
|
||||
};
|
||||
|
||||
struct ip_comp_hdr;
|
||||
struct sk_buff;
|
||||
struct netlink_ext_ack;
|
||||
struct xfrm_state;
|
||||
|
||||
int ipcomp_input(struct xfrm_state *x, struct sk_buff *skb);
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
* Copyright (c) 2002 James Morris <jmorris@intercode.com.au>
|
||||
*/
|
||||
|
||||
#include <crypto/acompress.h>
|
||||
#include <crypto/aead.h>
|
||||
#include <crypto/hash.h>
|
||||
#include <crypto/skcipher.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/pfkeyv2.h>
|
||||
#include <linux/crypto.h>
|
||||
#include <linux/scatterlist.h>
|
||||
#include <net/xfrm.h>
|
||||
#if IS_ENABLED(CONFIG_INET_ESP) || IS_ENABLED(CONFIG_INET6_ESP)
|
||||
@@ -669,7 +669,7 @@ static const struct xfrm_algo_list xfrm_ealg_list = {
|
||||
};
|
||||
|
||||
static const struct xfrm_algo_list xfrm_calg_list = {
|
||||
.find = crypto_has_comp,
|
||||
.find = crypto_has_acomp,
|
||||
.algs = calg_list,
|
||||
.entries = ARRAY_SIZE(calg_list),
|
||||
};
|
||||
@@ -828,8 +828,7 @@ void xfrm_probe_algs(void)
|
||||
}
|
||||
|
||||
for (i = 0; i < calg_entries(); i++) {
|
||||
status = crypto_has_comp(calg_list[i].name, 0,
|
||||
CRYPTO_ALG_ASYNC);
|
||||
status = crypto_has_acomp(calg_list[i].name, 0, 0);
|
||||
if (calg_list[i].available != status)
|
||||
calg_list[i].available = status;
|
||||
}
|
||||
|
||||
+233
-245
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user