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 6ED505A4D for ; Thu, 18 Aug 2016 10:34:23 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga103.jf.intel.com with ESMTP; 18 Aug 2016 01:34:22 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,538,1464678000"; d="scan'208";a="1043333760" Received: from yliu-dev.sh.intel.com (HELO yliu-dev) ([10.239.67.162]) by fmsmga002.fm.intel.com with ESMTP; 18 Aug 2016 01:34:22 -0700 Date: Thu, 18 Aug 2016 16:43:15 +0800 From: Yuanhan Liu To: Maxime Coquelin Cc: Jiayu Hu , dev@dpdk.org Message-ID: <20160818084315.GX30752@yliu-dev.sh.intel.com> References: <1471364079-116217-1-git-send-email-jiayu.hu@intel.com> <1471364079-116217-3-git-send-email-jiayu.hu@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [dpdk-dev] [PATCH 2/2] examples/vhost: support multiple socket files 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: Thu, 18 Aug 2016 08:34:23 -0000 On Thu, Aug 18, 2016 at 10:27:55AM +0200, Maxime Coquelin wrote: > > > On 08/16/2016 06:14 PM, Jiayu Hu wrote: > >When examples/vhost runs in client mode, only one QEMU can be connected. > >This is because that examples/vhost just supports one socket file. This > >patch is to add multiple sockets support for examples/vhost. > > > >Signed-off-by: Jiayu Hu > >--- > > examples/vhost/main.c | 50 ++++++++++++++++++++++++++++++++++++++------------ > > 1 file changed, 38 insertions(+), 12 deletions(-) > > > >diff --git a/examples/vhost/main.c b/examples/vhost/main.c > >index a718577..9974f0b 100644 > >--- a/examples/vhost/main.c > >+++ b/examples/vhost/main.c > >@@ -136,8 +136,9 @@ static uint32_t burst_rx_delay_time = BURST_RX_WAIT_US; > > /* Specify the number of retries on RX. */ > > static uint32_t burst_rx_retry_num = BURST_RX_RETRIES; > > > >-/* Socket file path. Can be set by user */ > >-static char socket_file[PATH_MAX] = "vhost-net"; > Default name being removed, you can drop my comment on patch 1. :) > > >+/* Socket file paths. Can be set by user */ > >+static char *socket_files; > >+int nb_sockets; > Any reason not to make it static? Right, it should be "static". Hmm, I missed it in review :( --yliu