From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ouyang Changchun Subject: [PATCH] vhost: Fix the vhost broken issue Date: Mon, 13 Oct 2014 15:39:40 +0800 Message-ID: <1413185980-17348-1-git-send-email-changchun.ouyang@intel.com> To: dev-VfR2kkLFssw@public.gmane.org Return-path: List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" As the vhost sample is broken by the following commit, commit 08b563ffb19d8baf59dd84200f25bc85031d18a7 Author: Olivier Matz Date: Thu Sep 11 14:15:35 2014 +0100 mbuf: replace data pointer by an offset It leads to segment fault error in vhost when binding a virtio device MAC address to its corresponding VMDq pool by executing command line 'start tx-first' in test-pmd on guest. This patch fixes that issue. Signed-off-by: Changchun Ouyang --- examples/vhost/main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/vhost/main.c b/examples/vhost/main.c index 9cf8e20..a6db607 100644 --- a/examples/vhost/main.c +++ b/examples/vhost/main.c @@ -1782,6 +1782,7 @@ virtio_dev_tx(struct virtio_net* dev, struct rte_mempool *mbuf_pool) /* Setup dummy mbuf. This is copied to a real mbuf if transmitted out the physical port. */ m.data_len = desc->len; m.pkt_len = desc->len; + m.buf_addr = (void *)(uintptr_t)buff_addr; m.data_off = 0; PRINT_PACKET(dev, (uintptr_t)buff_addr, desc->len, 0); -- 1.8.4.2