DPDK patches and discussions
 help / color / mirror / Atom feed
From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
To: dev@dpdk.org
Cc: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Subject: [dpdk-dev] [PATCH 1/2] xen: fix compilation on 32 bits
Date: Sun, 10 Apr 2016 20:25:51 +0100	[thread overview]
Message-ID: <1460316352-16209-2-git-send-email-pablo.de.lara.guarch@intel.com> (raw)
In-Reply-To: <1460316352-16209-1-git-send-email-pablo.de.lara.guarch@intel.com>

Compilation fails on 32 bits on Xen driver, due to wrong casting:

drivers/net/xenvirt/virtqueue.h: In function ‘virtqueue_enqueue_xmit’:
drivers/net/xenvirt/virtqueue.h:234:24: error: cast from pointer to integer
                            of different size [-Werror=pointer-to-int-cast]
  start_dp[idx].addr  = rte_pktmbuf_mtod(cookie, uint64_t);
                        ^

Fixes: d6b324c00fc9 ("mbuf: get DMA address")

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 drivers/net/xenvirt/virtqueue.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/xenvirt/virtqueue.h b/drivers/net/xenvirt/virtqueue.h
index e425a04..350eae3 100644
--- a/drivers/net/xenvirt/virtqueue.h
+++ b/drivers/net/xenvirt/virtqueue.h
@@ -231,7 +231,7 @@ virtqueue_enqueue_xmit(struct virtqueue *txvq, struct rte_mbuf *cookie)
 	start_dp[idx].flags = VRING_DESC_F_NEXT;
 	start_dp[idx].addr  = (uintptr_t)NULL;
 	idx = start_dp[idx].next;
-	start_dp[idx].addr  = rte_pktmbuf_mtod(cookie, uint64_t);
+	start_dp[idx].addr  = (uint64_t)rte_pktmbuf_mtod(cookie, uintptr_t);
 	start_dp[idx].len   = cookie->data_len;
 	start_dp[idx].flags = 0;
 	idx = start_dp[idx].next;
-- 
2.5.0

  reply	other threads:[~2016-04-10 19:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-10 19:25 [dpdk-dev] [PATCH 0/2] Fix Xen compilation for " Pablo de Lara
2016-04-10 19:25 ` Pablo de Lara [this message]
2016-04-10 19:25 ` [dpdk-dev] [PATCH 2/2] vhost_xen: fix compilation on " Pablo de Lara
2016-04-10 19:37 ` [dpdk-dev] [PATCH 0/2] Fix Xen compilation for " 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=1460316352-16209-2-git-send-email-pablo.de.lara.guarch@intel.com \
    --to=pablo.de.lara.guarch@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).