From f9d2068d9ff0aa855b40365fe1826af69e179047 Mon Sep 17 00:00:00 2001 From: Pablo de Lara Date: Thu, 20 Nov 2014 10:50:07 +0000 Subject: [PATCH] examples/dpdk_qat: fix reference to old mbuf field Since commit 08b563ffb19 ("mbuf: replace data pointer by an offset"), data is not an mbuf field anymore. Signed-off-by: Pablo de Lara Acked-by: Thomas Monjalon --- examples/dpdk_qat/crypto.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/dpdk_qat/crypto.c b/examples/dpdk_qat/crypto.c index 318d47c097..f49408a649 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; -- 2.20.1