From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 54DD46AAC for ; Mon, 13 Oct 2014 09:34:56 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga103.jf.intel.com with ESMTP; 13 Oct 2014 00:36:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.04,708,1406617200"; d="scan'208";a="617566695" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by orsmga002.jf.intel.com with ESMTP; 13 Oct 2014 00:39:48 -0700 Received: from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com [10.239.29.89]) by shvmail01.sh.intel.com with ESMTP id s9D7dkEm018612; Mon, 13 Oct 2014 15:39:46 +0800 Received: from shecgisg004.sh.intel.com (localhost [127.0.0.1]) by shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id s9D7diZi017381; Mon, 13 Oct 2014 15:39:46 +0800 Received: (from couyang@localhost) by shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id s9D7diEn017377; Mon, 13 Oct 2014 15:39:44 +0800 From: Ouyang Changchun To: dev@dpdk.org Date: Mon, 13 Oct 2014 15:39:40 +0800 Message-Id: <1413185980-17348-1-git-send-email-changchun.ouyang@intel.com> X-Mailer: git-send-email 1.7.12.2 Subject: [dpdk-dev] [PATCH] vhost: Fix the vhost broken issue X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Oct 2014 07:34:57 -0000 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