DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 1/2] common/octeontx2: sync cpt mailbox
@ 2020-07-31 13:51 Ankur Dwivedi
  2020-07-31 13:51 ` [dpdk-dev] [PATCH 2/2] crypto/octeontx2: add cpt kernel driver version check Ankur Dwivedi
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Ankur Dwivedi @ 2020-07-31 13:51 UTC (permalink / raw)
  To: dev; +Cc: akhil.goyal, jerinj, ndabilpuram, anoobj, ktejasree, Ankur Dwivedi

From: Tejasree Kondoj <ktejasree@marvell.com>

This patch syncs the pmd mailbox with the cpt pf driver.

Signed-off-by: Ankur Dwivedi <adwivedi@marvell.com>
Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
---
 drivers/common/octeontx2/otx2_mbox.h | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/common/octeontx2/otx2_mbox.h b/drivers/common/octeontx2/otx2_mbox.h
index 34b1d06..51e657a 100644
--- a/drivers/common/octeontx2/otx2_mbox.h
+++ b/drivers/common/octeontx2/otx2_mbox.h
@@ -1224,6 +1224,8 @@ struct cpt_rd_wr_reg_msg {
 	uint64_t __otx2_io *ret_val;
 	uint64_t __otx2_io val;
 	uint8_t __otx2_io is_write;
+	/* BLKADDR_CPT0/BLKADDR_CPT1 or 0 for BLKADDR_CPT0 */
+	uint8_t __otx2_io blkaddr;
 };
 
 struct cpt_set_crypto_grp_req_msg {
@@ -1235,11 +1237,14 @@ struct cpt_lf_alloc_req_msg {
 	struct mbox_msghdr hdr;
 	uint16_t __otx2_io nix_pf_func;
 	uint16_t __otx2_io sso_pf_func;
+	uint16_t __otx2_io eng_grpmask;
+	/* BLKADDR_CPT0/BLKADDR_CPT1 or 0 for BLKADDR_CPT0 */
+	uint8_t __otx2_io blkaddr;
 };
 
 struct cpt_lf_alloc_rsp_msg {
 	struct mbox_msghdr hdr;
-	uint8_t __otx2_io crypto_eng_grp;
+	uint16_t __otx2_io eng_grpmsk;
 };
 
 #define CPT_INLINE_INBOUND	0
-- 
1.9.3


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [dpdk-dev] [PATCH 2/2] crypto/octeontx2: add cpt kernel driver version check
  2020-07-31 13:51 [dpdk-dev] [PATCH 1/2] common/octeontx2: sync cpt mailbox Ankur Dwivedi
@ 2020-07-31 13:51 ` Ankur Dwivedi
  2020-10-07  6:44 ` [dpdk-dev] [PATCH 1/2] common/octeontx2: sync cpt mailbox Anoob Joseph
  2020-10-08 21:16 ` Akhil Goyal
  2 siblings, 0 replies; 4+ messages in thread
From: Ankur Dwivedi @ 2020-07-31 13:51 UTC (permalink / raw)
  To: dev; +Cc: akhil.goyal, jerinj, ndabilpuram, anoobj, ktejasree, Ankur Dwivedi

From: Tejasree Kondoj <ktejasree@marvell.com>

This patch checks if cpt pmd is compatible with kernel
cpt driver.

Signed-off-by: Ankur Dwivedi <adwivedi@marvell.com>
Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
---
 drivers/crypto/octeontx2/otx2_cryptodev.h      | 1 +
 drivers/crypto/octeontx2/otx2_cryptodev_mbox.c | 7 +++++++
 2 files changed, 8 insertions(+)

diff --git a/drivers/crypto/octeontx2/otx2_cryptodev.h b/drivers/crypto/octeontx2/otx2_cryptodev.h
index a00f3d6..fba7222 100644
--- a/drivers/crypto/octeontx2/otx2_cryptodev.h
+++ b/drivers/crypto/octeontx2/otx2_cryptodev.h
@@ -15,6 +15,7 @@
 
 #define OTX2_CPT_MAX_LFS		64
 #define OTX2_CPT_MAX_QUEUES_PER_VF	64
+#define OTX2_CPT_PMD_VERSION		3
 
 /**
  * Device private data
diff --git a/drivers/crypto/octeontx2/otx2_cryptodev_mbox.c b/drivers/crypto/octeontx2/otx2_cryptodev_mbox.c
index 6028439..75e610d 100644
--- a/drivers/crypto/octeontx2/otx2_cryptodev_mbox.c
+++ b/drivers/crypto/octeontx2/otx2_cryptodev_mbox.c
@@ -29,6 +29,13 @@
 	if (ret)
 		return -EIO;
 
+	if (rsp->cpt_pf_drv_version != OTX2_CPT_PMD_VERSION) {
+		otx2_err("Incompatible CPT PMD version"
+			 "(Kernel: 0x%04x DPDK: 0x%04x)",
+			  rsp->cpt_pf_drv_version, OTX2_CPT_PMD_VERSION);
+		return -EPIPE;
+	}
+
 	memcpy(hw_caps, rsp->eng_caps,
 		sizeof(union cpt_eng_caps) * CPT_MAX_ENG_TYPES);
 
-- 
1.9.3


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [PATCH 1/2] common/octeontx2: sync cpt mailbox
  2020-07-31 13:51 [dpdk-dev] [PATCH 1/2] common/octeontx2: sync cpt mailbox Ankur Dwivedi
  2020-07-31 13:51 ` [dpdk-dev] [PATCH 2/2] crypto/octeontx2: add cpt kernel driver version check Ankur Dwivedi
@ 2020-10-07  6:44 ` Anoob Joseph
  2020-10-08 21:16 ` Akhil Goyal
  2 siblings, 0 replies; 4+ messages in thread
From: Anoob Joseph @ 2020-10-07  6:44 UTC (permalink / raw)
  To: Ankur Dwivedi, dev
  Cc: akhil.goyal, Jerin Jacob Kollanukkaran, Nithin Kumar Dabilpuram,
	Tejasree Kondoj, Ankur Dwivedi

> -----Original Message-----
> From: Ankur Dwivedi <adwivedi@marvell.com>
> Sent: Friday, July 31, 2020 7:22 PM
> To: dev@dpdk.org
> Cc: akhil.goyal@nxp.com; Jerin Jacob Kollanukkaran <jerinj@marvell.com>;
> Nithin Kumar Dabilpuram <ndabilpuram@marvell.com>; Anoob Joseph
> <anoobj@marvell.com>; Tejasree Kondoj <ktejasree@marvell.com>; Ankur
> Dwivedi <adwivedi@marvell.com>
> Subject: [PATCH 1/2] common/octeontx2: sync cpt mailbox
> 
> From: Tejasree Kondoj <ktejasree@marvell.com>
> 
> This patch syncs the pmd mailbox with the cpt pf driver.
> 
> Signed-off-by: Ankur Dwivedi <adwivedi@marvell.com>
> Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>

Series Acked-by: Anoob Joseph <anoobj@marvell.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [PATCH 1/2] common/octeontx2: sync cpt mailbox
  2020-07-31 13:51 [dpdk-dev] [PATCH 1/2] common/octeontx2: sync cpt mailbox Ankur Dwivedi
  2020-07-31 13:51 ` [dpdk-dev] [PATCH 2/2] crypto/octeontx2: add cpt kernel driver version check Ankur Dwivedi
  2020-10-07  6:44 ` [dpdk-dev] [PATCH 1/2] common/octeontx2: sync cpt mailbox Anoob Joseph
@ 2020-10-08 21:16 ` Akhil Goyal
  2 siblings, 0 replies; 4+ messages in thread
From: Akhil Goyal @ 2020-10-08 21:16 UTC (permalink / raw)
  To: Ankur Dwivedi, dev; +Cc: jerinj, ndabilpuram, anoobj, ktejasree

> From: Tejasree Kondoj <ktejasree@marvell.com>
> 
> This patch syncs the pmd mailbox with the cpt pf driver.
> 
> Signed-off-by: Ankur Dwivedi <adwivedi@marvell.com>
> Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
> ---
>  drivers/common/octeontx2/otx2_mbox.h | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
Series applied to dpdk-next-crypto

Thanks.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-10-08 21:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-31 13:51 [dpdk-dev] [PATCH 1/2] common/octeontx2: sync cpt mailbox Ankur Dwivedi
2020-07-31 13:51 ` [dpdk-dev] [PATCH 2/2] crypto/octeontx2: add cpt kernel driver version check Ankur Dwivedi
2020-10-07  6:44 ` [dpdk-dev] [PATCH 1/2] common/octeontx2: sync cpt mailbox Anoob Joseph
2020-10-08 21:16 ` Akhil Goyal

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).