DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bernard Iremonger <bernard.iremonger@intel.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH v3 1/1] vhost_xen: fix compile error in main.c
Date: Sun,  1 Nov 2015 15:58:57 +0000	[thread overview]
Message-ID: <1446393537-21058-2-git-send-email-bernard.iremonger@intel.com> (raw)
In-Reply-To: <1446393537-21058-1-git-send-email-bernard.iremonger@intel.com>

/examples/vhost_xen/main.c:659:61: error: âas no member named â ata, rte_pktmbuf_data_len(buff));
 rte_memcpy((void *)(uintptr_t)buff_addr, (const void*)buff->data, rte_pktmbuf_data_len(buff));
    make[1]: *** [main.o] Error 1                            ^
make[1]: *** [main.o] Error 1

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
---
 doc/guides/rel_notes/release_2_2.rst | 3 +++
 examples/vhost_xen/main.c            | 8 +++++---
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/doc/guides/rel_notes/release_2_2.rst b/doc/guides/rel_notes/release_2_2.rst
index 89e4d58..3745ea2 100644
--- a/doc/guides/rel_notes/release_2_2.rst
+++ b/doc/guides/rel_notes/release_2_2.rst
@@ -92,6 +92,9 @@ Libraries
 Examples
 ~~~~~~~~
 
+* **vhost_xen: Fixed compile error.**
+
+  Fixed compile error in examples/vhost_xen/main.c
 
 Other
 ~~~~~
diff --git a/examples/vhost_xen/main.c b/examples/vhost_xen/main.c
index 5d20700..d124be1 100644
--- a/examples/vhost_xen/main.c
+++ b/examples/vhost_xen/main.c
@@ -1,7 +1,7 @@
 /*-
  *   BSD LICENSE
  *
- *   Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
+ *   Copyright(c) 2010-2015 Intel Corporation. All rights reserved.
  *   All rights reserved.
  *
  *   Redistribution and use in source and binary forms, with or without
@@ -579,6 +579,7 @@ virtio_dev_rx(struct virtio_net *dev, struct rte_mbuf **pkts, uint32_t count)
 	uint16_t res_base_idx, res_end_idx;
 	uint16_t free_entries;
 	uint8_t success = 0;
+	void *userdata;
 
 	LOG_DEBUG(VHOST_DATA, "(%"PRIu64") virtio_dev_rx()\n", dev->device_fh);
 	vq = dev->virtqueue_rx;
@@ -656,13 +657,14 @@ virtio_dev_rx(struct virtio_net *dev, struct rte_mbuf **pkts, uint32_t count)
 		vq->used->ring[res_cur_idx & (vq->size - 1)].len = packet_len;
 
 		/* Copy mbuf data to buffer */
-		rte_memcpy((void *)(uintptr_t)buff_addr, (const void*)buff->data, rte_pktmbuf_data_len(buff));
+		userdata = rte_pktmbuf_mtod(buff, void *);
+		rte_memcpy((void *)(uintptr_t)buff_addr, userdata, rte_pktmbuf_data_len(buff));
 
 		res_cur_idx++;
 		packet_success++;
 
 		/* mergeable is disabled then a header is required per buffer. */
-		rte_memcpy((void *)(uintptr_t)buff_hdr_addr, (const void*)&virtio_hdr, vq->vhost_hlen);
+		rte_memcpy((void *)(uintptr_t)buff_hdr_addr, (const void *)&virtio_hdr, vq->vhost_hlen);
 		if (res_cur_idx < res_end_idx) {
 			/* Prefetch descriptor index. */
 			rte_prefetch0(&vq->desc[head[packet_success]]);
-- 
1.9.1

  reply	other threads:[~2015-11-01 15:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <PATCH v3>
2015-10-27 17:12 ` [dpdk-dev] [PATCH v3 0/1] vmxnet3 hotplug support Bernard Iremonger
2015-10-27 17:12   ` [dpdk-dev] [PATCH v3 1/1] vmxnet3: add PCI Port Hotplug support Bernard Iremonger
2015-11-03 18:28     ` Thomas Monjalon
2015-11-01 15:58 ` [dpdk-dev] [PATCH v3 0/1] vhost_xen: fix compile error Bernard Iremonger
2015-11-01 15:58   ` Bernard Iremonger [this message]
2015-12-07  1:54     ` [dpdk-dev] [PATCH v3 1/1] vhost_xen: fix compile error in main.c 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=1446393537-21058-2-git-send-email-bernard.iremonger@intel.com \
    --to=bernard.iremonger@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).