From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yuanhan Liu Subject: Re: [PATCH 2/2] examples/vhost: support multiple socket files Date: Thu, 18 Aug 2016 16:01:44 +0800 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 Cc: dev@dpdk.org To: Jiayu Hu 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) Content-Disposition: inline In-Reply-To: <1471364079-116217-3-git-send-email-jiayu.hu@intel.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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