Re: [PATCH 2/2] examples/vhost: support multiple socket files
flat view
From: Yuanhan Liu <hidden>
Date: 2016-08-18 07:52:52
On Tue, Aug 16, 2016 at 12:14:39PM -0400, Jiayu Hu wrote:
quoted hunk ↗ jump to hunk
+/* + * This function is used to unregister drivers. + */ +static void +unregister_drivers(int socket_num) +{
Redundant comment. The function name already explains it well.
quoted hunk ↗ jump to hunk
/* 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 <Message-ID of the previous patch> --to dev@dpdk.org --cc <everybody discussing the patch> --yliu