From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 9A0BC5939 for ; Thu, 18 Aug 2016 09:52:52 +0200 (CEST) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga104.fm.intel.com with ESMTP; 18 Aug 2016 00:52:51 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,538,1464678000"; d="scan'208";a="867434689" Received: from yliu-dev.sh.intel.com (HELO yliu-dev) ([10.239.67.162]) by orsmga003.jf.intel.com with ESMTP; 18 Aug 2016 00:52:51 -0700 Date: Thu, 18 Aug 2016 16:01:44 +0800 From: Yuanhan Liu To: Jiayu Hu Cc: dev@dpdk.org Message-ID: <20160818080144.GT30752@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: <1471364079-116217-3-git-send-email-jiayu.hu@intel.com> 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 07:52:53 -0000 On Tue, Aug 16, 2016 at 12:14:39PM -0400, Jiayu Hu wrote: > +/* > + * This function is used to unregister drivers. > + */ > +static void > +unregister_drivers(int socket_num) > +{ Redundant comment. The function name already explains it well. > /* Register vhost user driver to handle vhost messages. */ > - ret = rte_vhost_driver_register(socket_file, flags); > - if (ret != 0) > - rte_exit(EXIT_FAILURE, "vhost driver register failure.\n"); > + for (i = 0; i < nb_sockets; i++) { > + ret = rte_vhost_driver_register > + (socket_files + i * PATH_MAX, flags); > + if (ret != 0) { > + unregister_drivers(i); > + rte_exit(EXIT_FAILURE, "vhost driver register failure.\n"); Lines over 80 chars. Besides, please cc corresponding maintainers while sending patches, say cc me for virtio/vhost changes. From MAINTAINERS you could find the names. So, please make a v2, with above 2 minor fixed. And also, please follow the guide on http://dpdk.org/dev to send v2: If a previous version of the patch has already been sent, a version number and changelog annotations are helpful: git send-email -1 -v2 --annotate --in-reply-to --to dev@dpdk.org --cc --yliu