[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230719091830.50866-2-louis.peens@corigine.com>
Date: Wed, 19 Jul 2023 11:18:29 +0200
From: Louis Peens <louis.peens@...igine.com>
To: David Miller <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>
Cc: Steffen Klassert <steffen.klassert@...unet.com>,
Herbert Xu <herbert@...dor.apana.org.au>,
Leon Romanovsky <leon@...nel.org>,
Simon Horman <simon.horman@...igine.com>,
Shihong Wang <shihong.wang@...igine.com>,
netdev@...r.kernel.org,
oss-drivers@...igine.com
Subject: [PATCH net-next 1/2] xfrm: add the description of CHACHA20-POLY1305 for xfrm algorithm description
From: Shihong Wang <shihong.wang@...igine.com>
Add the description of CHACHA20-POLY1305 for xfrm algorithm description
and set pfkey_supported to 1 so that xfrm supports that the algorithm
can be offloaded to the NIC.
Signed-off-by: Shihong Wang <shihong.wang@...igine.com>
Acked-by: Simon Horman <simon.horman@...igine.com>
Signed-off-by: Louis Peens <louis.peens@...igine.com>
---
include/uapi/linux/pfkeyv2.h | 1 +
net/xfrm/xfrm_algo.c | 9 ++++++++-
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/include/uapi/linux/pfkeyv2.h b/include/uapi/linux/pfkeyv2.h
index 8abae1f6749c..d0ab530e1069 100644
--- a/include/uapi/linux/pfkeyv2.h
+++ b/include/uapi/linux/pfkeyv2.h
@@ -331,6 +331,7 @@ struct sadb_x_filter {
#define SADB_X_EALG_CAMELLIACBC 22
#define SADB_X_EALG_NULL_AES_GMAC 23
#define SADB_X_EALG_SM4CBC 24
+#define SADB_X_EALG_CHACHA20_POLY1305 25
#define SADB_EALG_MAX 253 /* last EALG */
/* private allocations should use 249-255 (RFC2407) */
#define SADB_X_EALG_SERPENTCBC 252 /* draft-ietf-ipsec-ciph-aes-cbc-00 */
diff --git a/net/xfrm/xfrm_algo.c b/net/xfrm/xfrm_algo.c
index 094734fbec96..140821e9e840 100644
--- a/net/xfrm/xfrm_algo.c
+++ b/net/xfrm/xfrm_algo.c
@@ -167,7 +167,14 @@ static struct xfrm_algo_desc aead_list[] = {
}
},
- .pfkey_supported = 0,
+ .pfkey_supported = 1,
+
+ .desc = {
+ .sadb_alg_id = SADB_X_EALG_CHACHA20_POLY1305,
+ .sadb_alg_ivlen = 8,
+ .sadb_alg_minbits = 256,
+ .sadb_alg_maxbits = 256
+ }
},
};
--
2.34.1
Powered by blists - more mailing lists