[dpdk-dev] [PATCH 2/2] examples/vhost: support multiple socket files

Yuanhan Liu yuanhan.liu at linux.intel.com
Thu Aug 18 10:01:44 CEST 2016


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 <Message-ID of the previous patch>
    --to dev at dpdk.org --cc <everybody discussing the patch>


	--yliu


More information about the dev mailing list