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 B74BC591F for ; Thu, 18 Aug 2016 10:27:01 +0200 (CEST) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga103.jf.intel.com with ESMTP; 18 Aug 2016 01:26:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,538,1464678000"; d="scan'208";a="867449653" Received: from yliu-dev.sh.intel.com (HELO yliu-dev) ([10.239.67.162]) by orsmga003.jf.intel.com with ESMTP; 18 Aug 2016 01:26:51 -0700 Date: Thu, 18 Aug 2016 16:35:45 +0800 From: Yuanhan Liu To: Maxime Coquelin Cc: Jiayu Hu , dev@dpdk.org Message-ID: <20160818083545.GW30752@yliu-dev.sh.intel.com> References: <1471364079-116217-1-git-send-email-jiayu.hu@intel.com> <1471364079-116217-2-git-send-email-jiayu.hu@intel.com> <2675f217-e6e7-c3a0-9d34-c87b068bef3c@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2675f217-e6e7-c3a0-9d34-c87b068bef3c@redhat.com> User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [dpdk-dev] [PATCH 1/2] examples/vhost: rename dev-basename 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:27:02 -0000 On Thu, Aug 18, 2016 at 10:22:38AM +0200, Maxime Coquelin wrote: > Hi Jiayu, > > On 08/16/2016 06:14 PM, Jiayu Hu wrote: > >In examples/vhost, "dev-basename" is a program option, which is to set > >the vhost-net socket used by vhost-user, or the character device used > >by vhost-cuse. Since vhost-cuse should be dropped, and "dev-basename" > >is not a suitable name for the vhost-net socket. Therefore, this patch > >is to change this option name for examples/vhost. > > > >Signed-off-by: Jiayu Hu > >--- > > examples/vhost/main.c | 41 +++++++++++++++++++++-------------------- > > 1 file changed, 21 insertions(+), 20 deletions(-) > > > >diff --git a/examples/vhost/main.c b/examples/vhost/main.c > >index 92a9823..a718577 100644 > >--- a/examples/vhost/main.c > >+++ b/examples/vhost/main.c > >@@ -90,9 +90,6 @@ > > /* Size of buffers used for snprintfs. */ > > #define MAX_PRINT_BUFF 6072 > > > >-/* Maximum character device basename size. */ > >-#define MAX_BASENAME_SZ 10 > >- > > /* Maximum long option length for option parsing. */ > > #define MAX_LONG_OPT_SZ 64 > > > >@@ -139,8 +136,8 @@ 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; > > > >-/* Character device basename. Can be set by user. */ > >-static char dev_basename[MAX_BASENAME_SZ] = "vhost-net"; > >+/* Socket file path. Can be set by user */ > >+static char socket_file[PATH_MAX] = "vhost-net"; > > Not very important, but now that we only support vhost-user, > maybe we could default the name to "vhost-user"? > > There is no real convention I think, but this is what OVS is > used to use in its examples. I think it doesn't matter now, since since the 2nd patch, --socket-path is a must but not optional any more, meaning there is no default socket file path. --yliu > > Other than that: > Reviewed-by: Maxime Coquelin > > Thanks, > Maxime