DPDK patches and discussions
 help / color / mirror / Atom feed
From: John Griffin <john.griffin@intel.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH v2] qat:fix build on 32-bit systems
Date: Thu, 18 Feb 2016 10:57:32 +0000	[thread overview]
Message-ID: <1455793052-45947-1-git-send-email-john.griffin@intel.com> (raw)
In-Reply-To: <1455615876-29879-1-git-send-email-john.griffin@intel.com>

Fixing build on 32-bit systems on quick assist driver - for example:
drivers/crypto/qat/qat_crypto.c: In function ‘qat_alg_write_mbuf_entry’:
drivers/crypto/qat/qat_crypto.c:408:34: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]

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

Signed-off-by: John Griffin <john.griffin@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
v1->v2: 
 - Corrected subject text and included build failure.

 drivers/crypto/qat/qat_crypto.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/crypto/qat/qat_crypto.c b/drivers/crypto/qat/qat_crypto.c
index 129e96d..828756b 100644
--- a/drivers/crypto/qat/qat_crypto.c
+++ b/drivers/crypto/qat/qat_crypto.c
@@ -342,7 +342,7 @@ qat_crypto_pkt_rx_burst(void *qp, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
 
 	while (*(uint32_t *)resp_msg != ADF_RING_EMPTY_SIG &&
 			msg_counter != nb_pkts) {
-		rx_mbuf = (struct rte_mbuf *)(resp_msg->opaque_data);
+		rx_mbuf = (struct rte_mbuf *)(uintptr_t)(resp_msg->opaque_data);
 		ol = rte_pktmbuf_offload_get(rx_mbuf, RTE_PKTMBUF_OL_CRYPTO);
 
 		if (ICP_QAT_FW_COMN_STATUS_FLAG_OK !=
@@ -405,7 +405,7 @@ qat_alg_write_mbuf_entry(struct rte_mbuf *mbuf, uint8_t *out_msg)
 	ctx = (struct qat_session *)ol->op.crypto.session->_private;
 	qat_req = (struct icp_qat_fw_la_bulk_req *)out_msg;
 	*qat_req = ctx->fw_req;
-	qat_req->comn_mid.opaque_data = (uint64_t)mbuf;
+	qat_req->comn_mid.opaque_data = (uint64_t)(uintptr_t)mbuf;
 
 	/*
 	 * The following code assumes:
-- 
2.1.0

  parent reply	other threads:[~2016-02-18 10:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-16  9:44 [dpdk-dev] [PATCH] qat pmd:Fixing build issue " John Griffin
2016-02-16 15:52 ` De Lara Guarch, Pablo
2016-02-17 13:29   ` John Griffin
2016-02-18 10:57 ` John Griffin [this message]
2016-02-24 14:12   ` [dpdk-dev] [PATCH v2] qat:fix build " Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1455793052-45947-1-git-send-email-john.griffin@intel.com \
    --to=john.griffin@intel.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).