DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] examples/dpdk_qat: Fix reference to old mbuf field "data"
@ 2014-11-20 10:50 Pablo de Lara
  2014-11-24 15:50 ` Thomas Monjalon
  0 siblings, 1 reply; 2+ messages in thread
From: Pablo de Lara @ 2014-11-20 10:50 UTC (permalink / raw)
  To: dev

DPDK QAT app was using the old "data" field in mbuf,
so it has been subtituted with rte_pktmbuf_mtod function.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 examples/dpdk_qat/crypto.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/examples/dpdk_qat/crypto.c b/examples/dpdk_qat/crypto.c
index 318d47c..f49408a 100644
--- a/examples/dpdk_qat/crypto.c
+++ b/examples/dpdk_qat/crypto.c
@@ -183,7 +183,7 @@ struct glob_keys g_crypto_hash_keys = {
  *
  */
 #define PACKET_DATA_START_PHYS(p) \
-		((p)->buf_physaddr + ((char *)p->data - (char *)p->buf_addr))
+		((p)->buf_physaddr + (p)->data_off)
 
 /*
  * A fixed offset to where the crypto is to be performed, which is the first
@@ -773,7 +773,7 @@ enum crypto_result
 crypto_encrypt(struct rte_mbuf *rte_buff, enum cipher_alg c, enum hash_alg h)
 {
 	CpaCySymDpOpData *opData =
-			(CpaCySymDpOpData *) ((char *) (rte_buff->data)
+			(CpaCySymDpOpData *) (rte_pktmbuf_mtod(rte_buff, char *)
 					+ CRYPTO_OFFSET_TO_OPDATA);
 	uint32_t lcore_id;
 
@@ -848,7 +848,7 @@ enum crypto_result
 crypto_decrypt(struct rte_mbuf *rte_buff, enum cipher_alg c, enum hash_alg h)
 {
 
-	CpaCySymDpOpData *opData = (void*) (((char *) rte_buff->data)
+	CpaCySymDpOpData *opData = (void*) (rte_pktmbuf_mtod(rte_buff, char *)
 			+ CRYPTO_OFFSET_TO_OPDATA);
 	uint32_t lcore_id;
 
-- 
1.7.4.1

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

* Re: [dpdk-dev] [PATCH] examples/dpdk_qat: Fix reference to old mbuf field "data"
  2014-11-20 10:50 [dpdk-dev] [PATCH] examples/dpdk_qat: Fix reference to old mbuf field "data" Pablo de Lara
@ 2014-11-24 15:50 ` Thomas Monjalon
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Monjalon @ 2014-11-24 15:50 UTC (permalink / raw)
  To: Pablo de Lara; +Cc: dev

> DPDK QAT app was using the old "data" field in mbuf,
> so it has been subtituted with rte_pktmbuf_mtod function.
> 
> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>

Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>

Commit reference 08b563ffb19 ("mbuf: replace data pointer by an offset") added.
Applied

Thanks
-- 
Thomas

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

end of thread, other threads:[~2014-11-24 15:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-20 10:50 [dpdk-dev] [PATCH] examples/dpdk_qat: Fix reference to old mbuf field "data" Pablo de Lara
2014-11-24 15:50 ` 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).