DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] qat: fix phys address of content descriptor
@ 2016-05-30 12:38 Arek Kusztal
  2016-05-30 14:58 ` Jain, Deepak K
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Arek Kusztal @ 2016-05-30 12:38 UTC (permalink / raw)
  To: dev
  Cc: fiona.trahe, john.griffin, deepak.k.jain, olivier.matz,
	thomas.monjalon, Arkadiusz Kusztal

From: Arkadiusz Kusztal <arkadiuszx.kusztal@intel.com>

this patch fixes an error with computation of physical address of
content descriptor in the symmetric operations session

Signed-off-by: Arkadiusz Kusztal <arkadiuszx.kusztal@intel.com>
---
 drivers/crypto/qat/qat_crypto.c      | 9 ++++++---
 lib/librte_cryptodev/rte_cryptodev.c | 2 +-
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/drivers/crypto/qat/qat_crypto.c b/drivers/crypto/qat/qat_crypto.c
index 495ea1c..abe0511 100644
--- a/drivers/crypto/qat/qat_crypto.c
+++ b/drivers/crypto/qat/qat_crypto.c
@@ -807,12 +807,15 @@ static inline uint32_t adf_modulo(uint32_t data, uint32_t shift)
 	return data - mult;
 }
 
-void qat_crypto_sym_session_init(struct rte_mempool *mp, void *priv_sess)
+void qat_crypto_sym_session_init(struct rte_mempool *mp, void *sym_sess)
 {
-	struct qat_session *s = priv_sess;
+	struct rte_cryptodev_sym_session *sess = sym_sess;
+	struct qat_session *s = (void *)sess->_private;
 
 	PMD_INIT_FUNC_TRACE();
-	s->cd_paddr = rte_mempool_virt2phy(mp, &s->cd);
+	s->cd_paddr = rte_mempool_virt2phy(mp, sess) +
+		offsetof(struct qat_session, cd) +
+		offsetof(struct rte_cryptodev_sym_session, _private);
 }
 
 int qat_dev_config(__rte_unused struct rte_cryptodev *dev)
diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
index aa4ea42..960e2d5 100644
--- a/lib/librte_cryptodev/rte_cryptodev.c
+++ b/lib/librte_cryptodev/rte_cryptodev.c
@@ -956,7 +956,7 @@ rte_cryptodev_sym_session_init(struct rte_mempool *mp,
 	sess->mp = mp;
 
 	if (dev->dev_ops->session_initialize)
-		(*dev->dev_ops->session_initialize)(mp, sess->_private);
+		(*dev->dev_ops->session_initialize)(mp, sess);
 }
 
 static int
-- 
2.1.0

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

* Re: [dpdk-dev] [PATCH] qat: fix phys address of content descriptor
  2016-05-30 12:38 [dpdk-dev] [PATCH] qat: fix phys address of content descriptor Arek Kusztal
@ 2016-05-30 14:58 ` Jain, Deepak K
  2016-05-30 15:29 ` De Lara Guarch, Pablo
  2016-06-01 10:52 ` [dpdk-dev] [PATCH v2] " Arek Kusztal
  2 siblings, 0 replies; 6+ messages in thread
From: Jain, Deepak K @ 2016-05-30 14:58 UTC (permalink / raw)
  To: Kusztal, ArkadiuszX, dev
  Cc: Trahe, Fiona, Griffin, John, olivier.matz, thomas.monjalon


-----Original Message-----
From: Kusztal, ArkadiuszX 
Sent: Monday, May 30, 2016 1:39 PM
To: dev@dpdk.org
Cc: Trahe, Fiona <fiona.trahe@intel.com>; Griffin, John <john.griffin@intel.com>; Jain, Deepak K <deepak.k.jain@intel.com>; olivier.matz@6wind.com; thomas.monjalon@6wind.com; Kusztal, ArkadiuszX <arkadiuszx.kusztal@intel.com>
Subject: [PATCH] qat: fix phys address of content descriptor

From: Arkadiusz Kusztal <arkadiuszx.kusztal@intel.com>

this patch fixes an error with computation of physical address of content descriptor in the symmetric operations session

Signed-off-by: Arkadiusz Kusztal <arkadiuszx.kusztal@intel.com>
---
 drivers/crypto/qat/qat_crypto.c      | 9 ++++++---
 lib/librte_cryptodev/rte_cryptodev.c | 2 +-
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/drivers/crypto/qat/qat_crypto.c b/drivers/crypto/qat/qat_crypto.c index 495ea1c..abe0511 100644
--- a/drivers/crypto/qat/qat_crypto.c
+++ b/drivers/crypto/qat/qat_crypto.c
@@ -807,12 +807,15 @@ static inline uint32_t adf_modulo(uint32_t data, uint32_t shift)
 	return data - mult;
 }
 
-void qat_crypto_sym_session_init(struct rte_mempool *mp, void *priv_sess)
+void qat_crypto_sym_session_init(struct rte_mempool *mp, void 
+*sym_sess)
 {
-	struct qat_session *s = priv_sess;
+	struct rte_cryptodev_sym_session *sess = sym_sess;
+	struct qat_session *s = (void *)sess->_private;
 
 	PMD_INIT_FUNC_TRACE();
-	s->cd_paddr = rte_mempool_virt2phy(mp, &s->cd);
+	s->cd_paddr = rte_mempool_virt2phy(mp, sess) +
+		offsetof(struct qat_session, cd) +
+		offsetof(struct rte_cryptodev_sym_session, _private);
 }
 
 int qat_dev_config(__rte_unused struct rte_cryptodev *dev) diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
index aa4ea42..960e2d5 100644
--- a/lib/librte_cryptodev/rte_cryptodev.c
+++ b/lib/librte_cryptodev/rte_cryptodev.c
@@ -956,7 +956,7 @@ rte_cryptodev_sym_session_init(struct rte_mempool *mp,
 	sess->mp = mp;
 
 	if (dev->dev_ops->session_initialize)
-		(*dev->dev_ops->session_initialize)(mp, sess->_private);
+		(*dev->dev_ops->session_initialize)(mp, sess);
 }
 
 static int
--
2.1.0

Acked-by: Deepak Kumar Jain <deepak.k.jain@intel.com>

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

* Re: [dpdk-dev] [PATCH] qat: fix phys address of content descriptor
  2016-05-30 12:38 [dpdk-dev] [PATCH] qat: fix phys address of content descriptor Arek Kusztal
  2016-05-30 14:58 ` Jain, Deepak K
@ 2016-05-30 15:29 ` De Lara Guarch, Pablo
  2016-06-01 10:52 ` [dpdk-dev] [PATCH v2] " Arek Kusztal
  2 siblings, 0 replies; 6+ messages in thread
From: De Lara Guarch, Pablo @ 2016-05-30 15:29 UTC (permalink / raw)
  To: Kusztal, ArkadiuszX, dev
  Cc: Trahe, Fiona, Griffin, John, Jain, Deepak K, olivier.matz,
	thomas.monjalon, Kusztal, ArkadiuszX

Hi Arek,

> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Arek Kusztal
> Sent: Monday, May 30, 2016 1:39 PM
> To: dev@dpdk.org
> Cc: Trahe, Fiona; Griffin, John; Jain, Deepak K; olivier.matz@6wind.com;
> thomas.monjalon@6wind.com; Kusztal, ArkadiuszX
> Subject: [dpdk-dev] [PATCH] qat: fix phys address of content descriptor
> 
> From: Arkadiusz Kusztal <arkadiuszx.kusztal@intel.com>
> 
> this patch fixes an error with computation of physical address of
> content descriptor in the symmetric operations session
> 
> Signed-off-by: Arkadiusz Kusztal <arkadiuszx.kusztal@intel.com>

You forgot to include the "Fixes" line. Also you could reword the commit message like:
"Fixes wrong computation of physical address..."

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

* [dpdk-dev] [PATCH v2] qat: fix phys address of content descriptor
  2016-05-30 12:38 [dpdk-dev] [PATCH] qat: fix phys address of content descriptor Arek Kusztal
  2016-05-30 14:58 ` Jain, Deepak K
  2016-05-30 15:29 ` De Lara Guarch, Pablo
@ 2016-06-01 10:52 ` Arek Kusztal
  2016-06-02  8:37   ` Jain, Deepak K
  2 siblings, 1 reply; 6+ messages in thread
From: Arek Kusztal @ 2016-06-01 10:52 UTC (permalink / raw)
  To: dev
  Cc: fiona.trahe, john.griffin, deepak.k.jain, olivier.matz,
	thomas.monjalon, Arkadiusz Kusztal

From: Arkadiusz Kusztal <arkadiuszx.kusztal@intel.com>

Fix an error with computation of physical address of
content descriptor in the symmetric operations session

Fixes: 1703e94ac5ce ("qat: add driver for QuickAssist devices")

Signed-off-by: Arkadiusz Kusztal <arkadiuszx.kusztal@intel.com>
---
v2: Added fixes line to commit message

 drivers/crypto/qat/qat_crypto.c      | 9 ++++++---
 lib/librte_cryptodev/rte_cryptodev.c | 2 +-
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/drivers/crypto/qat/qat_crypto.c b/drivers/crypto/qat/qat_crypto.c
index 495ea1c..abe0511 100644
--- a/drivers/crypto/qat/qat_crypto.c
+++ b/drivers/crypto/qat/qat_crypto.c
@@ -807,12 +807,15 @@ static inline uint32_t adf_modulo(uint32_t data, uint32_t shift)
 	return data - mult;
 }
 
-void qat_crypto_sym_session_init(struct rte_mempool *mp, void *priv_sess)
+void qat_crypto_sym_session_init(struct rte_mempool *mp, void *sym_sess)
 {
-	struct qat_session *s = priv_sess;
+	struct rte_cryptodev_sym_session *sess = sym_sess;
+	struct qat_session *s = (void *)sess->_private;
 
 	PMD_INIT_FUNC_TRACE();
-	s->cd_paddr = rte_mempool_virt2phy(mp, &s->cd);
+	s->cd_paddr = rte_mempool_virt2phy(mp, sess) +
+		offsetof(struct qat_session, cd) +
+		offsetof(struct rte_cryptodev_sym_session, _private);
 }
 
 int qat_dev_config(__rte_unused struct rte_cryptodev *dev)
diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
index aa4ea42..960e2d5 100644
--- a/lib/librte_cryptodev/rte_cryptodev.c
+++ b/lib/librte_cryptodev/rte_cryptodev.c
@@ -956,7 +956,7 @@ rte_cryptodev_sym_session_init(struct rte_mempool *mp,
 	sess->mp = mp;
 
 	if (dev->dev_ops->session_initialize)
-		(*dev->dev_ops->session_initialize)(mp, sess->_private);
+		(*dev->dev_ops->session_initialize)(mp, sess);
 }
 
 static int
-- 
2.1.0

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

* Re: [dpdk-dev] [PATCH v2] qat: fix phys address of content descriptor
  2016-06-01 10:52 ` [dpdk-dev] [PATCH v2] " Arek Kusztal
@ 2016-06-02  8:37   ` Jain, Deepak K
  2016-06-07 14:51     ` Thomas Monjalon
  0 siblings, 1 reply; 6+ messages in thread
From: Jain, Deepak K @ 2016-06-02  8:37 UTC (permalink / raw)
  To: Kusztal, ArkadiuszX, dev
  Cc: Trahe, Fiona, Griffin, John, olivier.matz, thomas.monjalon

> -----Original Message-----
> From: Kusztal, ArkadiuszX
> Sent: Wednesday, June 1, 2016 11:52 AM
> To: dev@dpdk.org
> Cc: Trahe, Fiona <fiona.trahe@intel.com>; Griffin, John
> <john.griffin@intel.com>; Jain, Deepak K <deepak.k.jain@intel.com>;
> olivier.matz@6wind.com; thomas.monjalon@6wind.com; Kusztal, ArkadiuszX
> <arkadiuszx.kusztal@intel.com>
> Subject: [PATCH v2] qat: fix phys address of content descriptor
> 
> From: Arkadiusz Kusztal <arkadiuszx.kusztal@intel.com>
> 
> Fix an error with computation of physical address of content descriptor in the
> symmetric operations session
> 
> Fixes: 1703e94ac5ce ("qat: add driver for QuickAssist devices")
> 
> Signed-off-by: Arkadiusz Kusztal <arkadiuszx.kusztal@intel.com>
> ---
> v2: Added fixes line to commit message

Acked-by: Deepak Kumar JAIN <deepak.k.jain@intel.com>

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

* Re: [dpdk-dev] [PATCH v2] qat: fix phys address of content descriptor
  2016-06-02  8:37   ` Jain, Deepak K
@ 2016-06-07 14:51     ` Thomas Monjalon
  0 siblings, 0 replies; 6+ messages in thread
From: Thomas Monjalon @ 2016-06-07 14:51 UTC (permalink / raw)
  To: Kusztal, ArkadiuszX
  Cc: Jain, Deepak K, dev, Trahe, Fiona, Griffin, John, olivier.matz

> > Fix an error with computation of physical address of content descriptor in the
> > symmetric operations session
> > 
> > Fixes: 1703e94ac5ce ("qat: add driver for QuickAssist devices")
> > 
> > Signed-off-by: Arkadiusz Kusztal <arkadiuszx.kusztal@intel.com>
> > ---
> > v2: Added fixes line to commit message
> 
> Acked-by: Deepak Kumar JAIN <deepak.k.jain@intel.com>

Applied, thanks

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

end of thread, other threads:[~2016-06-07 14:51 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-30 12:38 [dpdk-dev] [PATCH] qat: fix phys address of content descriptor Arek Kusztal
2016-05-30 14:58 ` Jain, Deepak K
2016-05-30 15:29 ` De Lara Guarch, Pablo
2016-06-01 10:52 ` [dpdk-dev] [PATCH v2] " Arek Kusztal
2016-06-02  8:37   ` Jain, Deepak K
2016-06-07 14:51     ` Thomas Monjalon

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