* [PATCH net-next 0/2] net: add offload support for CHACHA20-POLY1305
@ 2023-07-19 9:18 Louis Peens
2023-07-19 9:18 ` [PATCH net-next 1/2] xfrm: add the description of CHACHA20-POLY1305 for xfrm algorithm description Louis Peens
2023-07-19 9:18 ` [PATCH net-next 2/2] nfp: add support CHACHA20-POLY1305 offload for ipsec Louis Peens
0 siblings, 2 replies; 9+ messages in thread
From: Louis Peens @ 2023-07-19 9:18 UTC (permalink / raw)
To: David Miller, Jakub Kicinski, Paolo Abeni
Cc: Steffen Klassert, Herbert Xu, Leon Romanovsky, Simon Horman,
Shihong Wang, netdev, oss-drivers
This short series adds support for offloading the CHACHA20-POLY1305
ipsec algorithm to nfp hardware. It starts off in patch 1 by teaching
xfrm about SADB_X_EALG_CHACHA20_POLY1305, and then continues to
configure the nfp for CHACHA20-POLY1305 offloading in patch 2.
Shihong Wang (2):
xfrm: add the description of CHACHA20-POLY1305 for xfrm algorithm
description
nfp: add support CHACHA20-POLY1305 offload for ipsec
.../net/ethernet/netronome/nfp/crypto/ipsec.c | 42 +++++++++++++++++--
include/uapi/linux/pfkeyv2.h | 1 +
net/xfrm/xfrm_algo.c | 9 +++-
3 files changed, 48 insertions(+), 4 deletions(-)
--
2.34.1
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH net-next 1/2] xfrm: add the description of CHACHA20-POLY1305 for xfrm algorithm description
2023-07-19 9:18 [PATCH net-next 0/2] net: add offload support for CHACHA20-POLY1305 Louis Peens
@ 2023-07-19 9:18 ` Louis Peens
2023-07-19 9:27 ` Steffen Klassert
2023-07-19 9:18 ` [PATCH net-next 2/2] nfp: add support CHACHA20-POLY1305 offload for ipsec Louis Peens
1 sibling, 1 reply; 9+ messages in thread
From: Louis Peens @ 2023-07-19 9:18 UTC (permalink / raw)
To: David Miller, Jakub Kicinski, Paolo Abeni
Cc: Steffen Klassert, Herbert Xu, Leon Romanovsky, Simon Horman,
Shihong Wang, netdev, oss-drivers
From: Shihong Wang <shihong.wang@corigine.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@corigine.com>
Acked-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: Louis Peens <louis.peens@corigine.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
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH net-next 2/2] nfp: add support CHACHA20-POLY1305 offload for ipsec
2023-07-19 9:18 [PATCH net-next 0/2] net: add offload support for CHACHA20-POLY1305 Louis Peens
2023-07-19 9:18 ` [PATCH net-next 1/2] xfrm: add the description of CHACHA20-POLY1305 for xfrm algorithm description Louis Peens
@ 2023-07-19 9:18 ` Louis Peens
1 sibling, 0 replies; 9+ messages in thread
From: Louis Peens @ 2023-07-19 9:18 UTC (permalink / raw)
To: David Miller, Jakub Kicinski, Paolo Abeni
Cc: Steffen Klassert, Herbert Xu, Leon Romanovsky, Simon Horman,
Shihong Wang, netdev, oss-drivers
From: Shihong Wang <shihong.wang@corigine.com>
Add the configuration of CHACHA20-POLY1305 to the driver and send the
message to hardware so that the NIC supports the algorithm.
Signed-off-by: Shihong Wang <shihong.wang@corigine.com>
Acked-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: Louis Peens <louis.peens@corigine.com>
---
.../net/ethernet/netronome/nfp/crypto/ipsec.c | 42 +++++++++++++++++--
1 file changed, 39 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/netronome/nfp/crypto/ipsec.c b/drivers/net/ethernet/netronome/nfp/crypto/ipsec.c
index b1f026b81dea..6b8a1874e4fc 100644
--- a/drivers/net/ethernet/netronome/nfp/crypto/ipsec.c
+++ b/drivers/net/ethernet/netronome/nfp/crypto/ipsec.c
@@ -421,12 +421,38 @@ static int nfp_net_xfrm_add_state(struct xfrm_state *x,
return -EINVAL;
}
break;
+ case SADB_X_EALG_CHACHA20_POLY1305:
+ if (nn->pdev->device != PCI_DEVICE_ID_NFP3800) {
+ NL_SET_ERR_MSG_MOD(extack, "Unsupported encryption algorithm for offload");
+ return -EINVAL;
+ }
+ if (!x->aead) {
+ NL_SET_ERR_MSG_MOD(extack, "Invalid CHACHA20 key data");
+ return -EINVAL;
+ }
+ if (x->aead->alg_icv_len != 128) {
+ NL_SET_ERR_MSG_MOD(extack,
+ "ICV must be 128bit with SADB_X_EALG_CHACHA20_POLY1305");
+ return -EINVAL;
+ }
+
+ /* Aead->alg_key_len includes 32-bit salt */
+ if (x->aead->alg_key_len - 32 != 256) {
+ NL_SET_ERR_MSG_MOD(extack, "Unsupported CHACHA20 key length");
+ return -EINVAL;
+ }
+
+ /* The CHACHA20's mode is not configured */
+ cfg->ctrl_word.hash = NFP_IPSEC_HASH_POLY1305_128;
+ cfg->ctrl_word.cipher = NFP_IPSEC_CIPHER_CHACHA20;
+ break;
default:
NL_SET_ERR_MSG_MOD(extack, "Unsupported encryption algorithm for offload");
return -EINVAL;
}
if (x->aead) {
+ int key_offset = 0;
int salt_len = 4;
key_len = DIV_ROUND_UP(x->aead->alg_key_len, BITS_PER_BYTE);
@@ -437,9 +463,19 @@ static int nfp_net_xfrm_add_state(struct xfrm_state *x,
return -EINVAL;
}
- for (i = 0; i < key_len / sizeof(cfg->ciph_key[0]) ; i++)
- cfg->ciph_key[i] = get_unaligned_be32(x->aead->alg_key +
- sizeof(cfg->ciph_key[0]) * i);
+ /* The CHACHA20's key order needs to be adjusted based on hardware design.
+ * Other's key order: {K0, K1, K2, K3, K4, K5, K6, K7}
+ * CHACHA20's key order: {K4, K5, K6, K7, K0, K1, K2, K3}
+ */
+ if (x->props.ealgo == SADB_X_EALG_CHACHA20_POLY1305)
+ key_offset = key_len / sizeof(cfg->ciph_key[0]) >> 1;
+
+ for (i = 0; i < key_len / sizeof(cfg->ciph_key[0]); i++) {
+ int index = (i + key_offset) % (key_len / sizeof(cfg->ciph_key[0]));
+
+ cfg->ciph_key[index] = get_unaligned_be32(x->aead->alg_key +
+ sizeof(cfg->ciph_key[0]) * i);
+ }
/* Load up the salt */
cfg->aesgcm_fields.salt = get_unaligned_be32(x->aead->alg_key + key_len);
--
2.34.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH net-next 1/2] xfrm: add the description of CHACHA20-POLY1305 for xfrm algorithm description
2023-07-19 9:18 ` [PATCH net-next 1/2] xfrm: add the description of CHACHA20-POLY1305 for xfrm algorithm description Louis Peens
@ 2023-07-19 9:27 ` Steffen Klassert
2023-07-19 9:35 ` Leon Romanovsky
2023-07-19 10:52 ` Yinjun Zhang
0 siblings, 2 replies; 9+ messages in thread
From: Steffen Klassert @ 2023-07-19 9:27 UTC (permalink / raw)
To: Louis Peens
Cc: David Miller, Jakub Kicinski, Paolo Abeni, Herbert Xu,
Leon Romanovsky, Simon Horman, Shihong Wang, netdev, oss-drivers
On Wed, Jul 19, 2023 at 11:18:29AM +0200, Louis Peens wrote:
> From: Shihong Wang <shihong.wang@corigine.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@corigine.com>
> Acked-by: Simon Horman <simon.horman@corigine.com>
> Signed-off-by: Louis Peens <louis.peens@corigine.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
Please don't add new stuff to pfkey, use netlink instead. This interface
is deprecated and will go away someday.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH net-next 1/2] xfrm: add the description of CHACHA20-POLY1305 for xfrm algorithm description
2023-07-19 9:27 ` Steffen Klassert
@ 2023-07-19 9:35 ` Leon Romanovsky
2023-07-19 9:51 ` Steffen Klassert
2023-07-19 10:52 ` Yinjun Zhang
1 sibling, 1 reply; 9+ messages in thread
From: Leon Romanovsky @ 2023-07-19 9:35 UTC (permalink / raw)
To: Steffen Klassert
Cc: Louis Peens, David Miller, Jakub Kicinski, Paolo Abeni,
Herbert Xu, Simon Horman, Shihong Wang, netdev, oss-drivers
On Wed, Jul 19, 2023 at 11:27:27AM +0200, Steffen Klassert wrote:
> On Wed, Jul 19, 2023 at 11:18:29AM +0200, Louis Peens wrote:
> > From: Shihong Wang <shihong.wang@corigine.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@corigine.com>
> > Acked-by: Simon Horman <simon.horman@corigine.com>
> > Signed-off-by: Louis Peens <louis.peens@corigine.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
>
> Please don't add new stuff to pfkey, use netlink instead. This interface
> is deprecated and will go away someday
Steffen, I have general questions.
From where did all these SADB_X_EALG_* values come?
And there are they used?
As an exercise, I checked SADB_X_EALG_SM4CBC usage in github and didn't
find anything.
https://github.com/search?q=SADB_X_EALG_SM4CBC&type=code
Thanks
>
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH net-next 1/2] xfrm: add the description of CHACHA20-POLY1305 for xfrm algorithm description
2023-07-19 9:35 ` Leon Romanovsky
@ 2023-07-19 9:51 ` Steffen Klassert
2023-07-19 10:02 ` Leon Romanovsky
0 siblings, 1 reply; 9+ messages in thread
From: Steffen Klassert @ 2023-07-19 9:51 UTC (permalink / raw)
To: Leon Romanovsky
Cc: Louis Peens, David Miller, Jakub Kicinski, Paolo Abeni,
Herbert Xu, Simon Horman, Shihong Wang, netdev, oss-drivers
On Wed, Jul 19, 2023 at 12:35:09PM +0300, Leon Romanovsky wrote:
> On Wed, Jul 19, 2023 at 11:27:27AM +0200, Steffen Klassert wrote:
> > On Wed, Jul 19, 2023 at 11:18:29AM +0200, Louis Peens wrote:
> > > From: Shihong Wang <shihong.wang@corigine.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@corigine.com>
> > > Acked-by: Simon Horman <simon.horman@corigine.com>
> > > Signed-off-by: Louis Peens <louis.peens@corigine.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
> >
> > Please don't add new stuff to pfkey, use netlink instead. This interface
> > is deprecated and will go away someday
>
> Steffen, I have general questions.
> >From where did all these SADB_X_EALG_* values come?
> And there are they used?
The pfkey interface was used by the old ipsec tools:
https://ipsec-tools.sourceforge.net/
The development of ipsec-tools has been abandoned
in 2014, as you can see at the webpage.
The pfkey interface is still there because the ipsec
tools are shipped in some disto versions that are
still under support.
Anyway, this was a reminder to me that we should
start the official deprecation process soon.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH net-next 1/2] xfrm: add the description of CHACHA20-POLY1305 for xfrm algorithm description
2023-07-19 9:51 ` Steffen Klassert
@ 2023-07-19 10:02 ` Leon Romanovsky
0 siblings, 0 replies; 9+ messages in thread
From: Leon Romanovsky @ 2023-07-19 10:02 UTC (permalink / raw)
To: Steffen Klassert
Cc: Louis Peens, David Miller, Jakub Kicinski, Paolo Abeni,
Herbert Xu, Simon Horman, Shihong Wang, netdev, oss-drivers
On Wed, Jul 19, 2023 at 11:51:41AM +0200, Steffen Klassert wrote:
> On Wed, Jul 19, 2023 at 12:35:09PM +0300, Leon Romanovsky wrote:
> > On Wed, Jul 19, 2023 at 11:27:27AM +0200, Steffen Klassert wrote:
> > > On Wed, Jul 19, 2023 at 11:18:29AM +0200, Louis Peens wrote:
> > > > From: Shihong Wang <shihong.wang@corigine.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@corigine.com>
> > > > Acked-by: Simon Horman <simon.horman@corigine.com>
> > > > Signed-off-by: Louis Peens <louis.peens@corigine.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
> > >
> > > Please don't add new stuff to pfkey, use netlink instead. This interface
> > > is deprecated and will go away someday
> >
> > Steffen, I have general questions.
> > >From where did all these SADB_X_EALG_* values come?
> > And there are they used?
>
> The pfkey interface was used by the old ipsec tools:
> https://ipsec-tools.sourceforge.net/
>
> The development of ipsec-tools has been abandoned
> in 2014, as you can see at the webpage.
Thanks
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: [PATCH net-next 1/2] xfrm: add the description of CHACHA20-POLY1305 for xfrm algorithm description
2023-07-19 9:27 ` Steffen Klassert
2023-07-19 9:35 ` Leon Romanovsky
@ 2023-07-19 10:52 ` Yinjun Zhang
2023-07-19 11:10 ` Steffen Klassert
1 sibling, 1 reply; 9+ messages in thread
From: Yinjun Zhang @ 2023-07-19 10:52 UTC (permalink / raw)
To: Steffen Klassert, Louis Peens
Cc: David Miller, Jakub Kicinski, Paolo Abeni, Herbert Xu,
Leon Romanovsky, Simon Horman, Shihong Wang,
netdev@vger.kernel.org, oss-drivers
On Wednesday, July 19, 2023 5:27 PM, Steffen Klassert wrote:
> On Wed, Jul 19, 2023 at 11:18:29AM +0200, Louis Peens wrote:
> > From: Shihong Wang <shihong.wang@corigine.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@corigine.com>
> > Acked-by: Simon Horman <simon.horman@corigine.com>
> > Signed-off-by: Louis Peens <louis.peens@corigine.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
>
> Please don't add new stuff to pfkey, use netlink instead. This interface
> is deprecated and will go away someday.
Sorry, we don't get it. How does driver know which algo it is without these
definitions? Is there any document guide that we can refer to?
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH net-next 1/2] xfrm: add the description of CHACHA20-POLY1305 for xfrm algorithm description
2023-07-19 10:52 ` Yinjun Zhang
@ 2023-07-19 11:10 ` Steffen Klassert
0 siblings, 0 replies; 9+ messages in thread
From: Steffen Klassert @ 2023-07-19 11:10 UTC (permalink / raw)
To: Yinjun Zhang
Cc: Louis Peens, David Miller, Jakub Kicinski, Paolo Abeni,
Herbert Xu, Leon Romanovsky, Simon Horman, Shihong Wang,
netdev@vger.kernel.org, oss-drivers
On Wed, Jul 19, 2023 at 10:52:03AM +0000, Yinjun Zhang wrote:
> On Wednesday, July 19, 2023 5:27 PM, Steffen Klassert wrote:
> > On Wed, Jul 19, 2023 at 11:18:29AM +0200, Louis Peens wrote:
> > > From: Shihong Wang <shihong.wang@corigine.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@corigine.com>
> > > Acked-by: Simon Horman <simon.horman@corigine.com>
> > > Signed-off-by: Louis Peens <louis.peens@corigine.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
> >
> > Please don't add new stuff to pfkey, use netlink instead. This interface
> > is deprecated and will go away someday.
>
> Sorry, we don't get it. How does driver know which algo it is without these
> definitions? Is there any document guide that we can refer to?
Ugh, I've just seen that you use this in the drivers. The correct way
would be to parse the name of the algorithm, as the crypto layer does
it.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2023-07-19 11:10 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-19 9:18 [PATCH net-next 0/2] net: add offload support for CHACHA20-POLY1305 Louis Peens
2023-07-19 9:18 ` [PATCH net-next 1/2] xfrm: add the description of CHACHA20-POLY1305 for xfrm algorithm description Louis Peens
2023-07-19 9:27 ` Steffen Klassert
2023-07-19 9:35 ` Leon Romanovsky
2023-07-19 9:51 ` Steffen Klassert
2023-07-19 10:02 ` Leon Romanovsky
2023-07-19 10:52 ` Yinjun Zhang
2023-07-19 11:10 ` Steffen Klassert
2023-07-19 9:18 ` [PATCH net-next 2/2] nfp: add support CHACHA20-POLY1305 offload for ipsec Louis Peens
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).