Skip to contentSkip to conversation

crypto/mvsam: IPSec full offload support

PATCH Superseded [email protected] 3 participants 8 messages Jul 1, 2021 – Jul 22, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 crypto/mvsam: IPSec full offload support

From: Michael Shamis <[email protected]>

This patch provides the support for IPSec protocol offload to the hardware.
Following security operations are added:
- session_create
- session_destroy
- capabilities_get

---
 drivers/crypto/mvsam/meson.build        |   2 +-
 drivers/crypto/mvsam/mrvl_pmd_private.h |   8 +-
 drivers/crypto/mvsam/rte_mrvl_pmd.c     | 331 +++++++++++++++++++++---
 drivers/crypto/mvsam/rte_mrvl_pmd_ops.c | 176 +++++++++++++
 4 files changed, 483 insertions(+), 34 deletions(-)
drivers/crypto/mvsam/meson.build +1 -1
index b4c55b5ff..db1787db6 100644
@@ -14,4 +14,4 @@ ext_deps += dep
 
 sources = files('rte_mrvl_pmd.c', 'rte_mrvl_pmd_ops.c')
 
-deps += ['bus_vdev', 'common_mvep']
+deps += ['bus_vdev', 'common_mvep', 'security']
drivers/crypto/mvsam/mrvl_pmd_private.h +7 -1
index e575330ef..719d73d82 100644
@@ -82,11 +82,17 @@ struct mrvl_crypto_src_table {
 } __rte_cache_aligned;
 
 /** Set and validate MRVL crypto session parameters */
-extern int
+int
 mrvl_crypto_set_session_parameters(struct mrvl_crypto_session *sess,
 		const struct rte_crypto_sym_xform *xform);
 
+int
+mrvl_ipsec_set_session_parameters(struct mrvl_crypto_session *sess,
+		struct rte_security_ipsec_xform *ipsec_xform,
+		struct rte_crypto_sym_xform *crypto_xform);
+
 /** device specific operations function pointer structure */
 extern struct rte_cryptodev_ops *rte_mrvl_crypto_pmd_ops;
+extern struct rte_security_ops *rte_mrvl_security_pmd_ops;
 
 #endif /* _MRVL_PMD_PRIVATE_H_ */
drivers/crypto/mvsam/rte_mrvl_pmd.c +299 -32

433 lines not on this page · raw message

drivers/crypto/mvsam/rte_mrvl_pmd_ops.c +176 -0

185 lines not on this page · raw message

Signature · 1 line
2.29.0
#1 lore raw

PATCH v2 1/1 crypto/mvsam: IPSec full offload support

From: Michael Shamis <[email protected]>

This patch provides the support for IPSec protocol offload to the hardware.
Following security operations are added:
- session_create
- session_destroy
- capabilities_get

---
 drivers/crypto/mvsam/meson.build        |   2 +-
 drivers/crypto/mvsam/mrvl_pmd_private.h |   8 +-
 drivers/crypto/mvsam/rte_mrvl_pmd.c     | 333 +++++++++++++++++++++---
 drivers/crypto/mvsam/rte_mrvl_pmd_ops.c | 176 +++++++++++++
 4 files changed, 484 insertions(+), 35 deletions(-)
drivers/crypto/mvsam/meson.build +1 -1
index c0c828fbf..fec167bf2 100644
@@ -14,4 +14,4 @@ ext_deps += dep
 
 sources = files('rte_mrvl_pmd.c', 'rte_mrvl_pmd_ops.c')
 
-deps += ['bus_vdev', 'common_mvep']
+deps += ['bus_vdev', 'common_mvep', 'security']
drivers/crypto/mvsam/mrvl_pmd_private.h +7 -1
index e575330ef..719d73d82 100644
@@ -82,11 +82,17 @@ struct mrvl_crypto_src_table {
 } __rte_cache_aligned;
 
 /** Set and validate MRVL crypto session parameters */
-extern int
+int
 mrvl_crypto_set_session_parameters(struct mrvl_crypto_session *sess,
 		const struct rte_crypto_sym_xform *xform);
 
+int
+mrvl_ipsec_set_session_parameters(struct mrvl_crypto_session *sess,
+		struct rte_security_ipsec_xform *ipsec_xform,
+		struct rte_crypto_sym_xform *crypto_xform);
+
 /** device specific operations function pointer structure */
 extern struct rte_cryptodev_ops *rte_mrvl_crypto_pmd_ops;
+extern struct rte_security_ops *rte_mrvl_security_pmd_ops;
 
 #endif /* _MRVL_PMD_PRIVATE_H_ */
drivers/crypto/mvsam/rte_mrvl_pmd.c +300 -33

441 lines not on this page · raw message

drivers/crypto/mvsam/rte_mrvl_pmd_ops.c +176 -0

185 lines not on this page · raw message

Signature · 1 line
2.17.1
#3 lore raw

The correct wording is "IPsec"
and it is flagged by devtools/check-git-log.sh

20/07/2021 22:49, Akhil Goyal:

Quoted 9 lines
Quoted 9 lines

From: Michael Shamis <[email protected]>

This patch provides the support for IPSec protocol offload to the hardware.
Following security operations are added:
- session_create
- session_destroy
- capabilities_get

Quoted 5 lines
Quoted 4 lines

---

Applied to dpdk-next-crypto

A checkpatch warning was ignored:

Warning in drivers/crypto/mvsam/rte_mrvl_pmd.c:
Declaring a variable inside for()

#4 lore raw
Quoted 3 lines

The correct wording is "IPsec"
and it is flagged by devtools/check-git-log.sh

Ahh my bad! Missed to run that on last patch.

Quoted 14 lines

20/07/2021 22:49, Akhil Goyal:

Quoted 13 lines
Quoted 13 lines

From: Michael Shamis <[email protected]>

This patch provides the support for IPSec protocol offload to the hardware.
Following security operations are added:
- session_create
- session_destroy
- capabilities_get

---

Quoted 7 lines
Quoted 1 line

Applied to dpdk-next-crypto

A checkpatch warning was ignored:

Warning in drivers/crypto/mvsam/rte_mrvl_pmd.c:
Declaring a variable inside for()

Will be fixing in next few minutes.
Thanks for highlighting

#5 lore raw
Quoted 23 lines
Quoted 4 lines

The correct wording is "IPsec"
and it is flagged by devtools/check-git-log.sh

Ahh my bad! Missed to run that on last patch.

Quoted 16 lines

20/07/2021 22:49, Akhil Goyal:

Quoted 14 lines
Quoted 9 lines

From: Michael Shamis <[email protected]>

This patch provides the support for IPSec protocol offload to the hardware.
Following security operations are added:
- session_create
- session_destroy
- capabilities_get

Quoted 4 lines

---

Applied to dpdk-next-crypto

Quoted 7 lines
Quoted 5 lines

A checkpatch warning was ignored:

Warning in drivers/crypto/mvsam/rte_mrvl_pmd.c:
Declaring a variable inside for()

Will be fixing in next few minutes.
Thanks for highlighting

It is fixed now.
Documentation update was also missing. It is also added.

@Dana Vardi, @Michael Shamis: please ensure to update documentation Along with patch.

#6 lore raw

21/07/2021 15:14, Akhil Goyal:

Quoted 10 lines
Quoted 7 lines
Quoted 5 lines

A checkpatch warning was ignored:

Warning in drivers/crypto/mvsam/rte_mrvl_pmd.c:
Declaring a variable inside for()

Will be fixing in next few minutes.
Thanks for highlighting

It is fixed now.
Documentation update was also missing. It is also added.

Thanks

Quoted 2 lines

@Dana Vardi, @Michael Shamis: please ensure to update documentation Along with patch.

You should implement checks for crypto doc in devtools/check-doc-vs-code.sh

#7 lore raw
Quoted 2 lines

You should implement checks for crypto doc in devtools/check-doc-vs- code.sh

Ok will look into it.