All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rusty Russell <rusty-8n+1lVoiYb80n/F98K4Iww@public.gmane.org>
To: Jens Axboe <axboe-tSWWG44O7X1aa/9Udqfwiw@public.gmane.org>,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	virtualization-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
	"Michael S. Tsirkin"
	<mst-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	Stefan Hajnoczi
	<stefanha-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	Paolo Bonzini <pbonzini-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	Ming Lei <ming.lei-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
Subject: Re: [RFC PATCH 2/2] block: virtio-blk: support multi virt queues per virtio-blk device
Date: Mon, 16 Jun 2014 22:17:05 +0930	[thread overview]
Message-ID: <877g4hnhrq.fsf@rustcorp.com.au> (raw)
In-Reply-To: <1402680562-8328-3-git-send-email-ming.lei-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>

Ming Lei <ming.lei-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org> writes:
> +	if (virtio_has_feature(vdev, VIRTIO_BLK_F_MQ))
> +		err = virtio_cread_feature(vdev, VIRTIO_BLK_F_MQ,
> +				   struct virtio_blk_config, num_queues,
> +				   &num_vqs);
> +	else
> +		num_vqs = 1;

This is redundant: virtio_cread_feature() checks the feature.

So, either:
        if (virtio_has_feature(vdev, VIRTIO_BLK_F_MQ))
                virtio_cread(vdev, struct virtio_blk_config, num_queues,
          		     &num_vqs);
        else
                num_vqs = 1;

Or:
	err = virtio_cread_feature(vdev, VIRTIO_BLK_F_MQ,
			   struct virtio_blk_config, num_queues,
			   &num_vqs);
        if (err)
                num_vqs = 1;

Otherwise, the patch looks pretty straight-forward.

Cheers,
Rusty.

WARNING: multiple messages have this Message-ID (diff)
From: Rusty Russell <rusty@rustcorp.com.au>
To: Ming Lei <ming.lei@canonical.com>, Jens Axboe <axboe@kernel.dk>,
	linux-kernel@vger.kernel.org
Cc: linux-api@vger.kernel.org,
	virtualization@lists.linux-foundation.org,
	"Michael S. Tsirkin" <mst@redhat.com>,
	Stefan Hajnoczi <stefanha@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Ming Lei <ming.lei@canonical.com>
Subject: Re: [RFC PATCH 2/2] block: virtio-blk: support multi virt queues per virtio-blk device
Date: Mon, 16 Jun 2014 22:17:05 +0930	[thread overview]
Message-ID: <877g4hnhrq.fsf@rustcorp.com.au> (raw)
In-Reply-To: <1402680562-8328-3-git-send-email-ming.lei@canonical.com>

Ming Lei <ming.lei@canonical.com> writes:
> +	if (virtio_has_feature(vdev, VIRTIO_BLK_F_MQ))
> +		err = virtio_cread_feature(vdev, VIRTIO_BLK_F_MQ,
> +				   struct virtio_blk_config, num_queues,
> +				   &num_vqs);
> +	else
> +		num_vqs = 1;

This is redundant: virtio_cread_feature() checks the feature.

So, either:
        if (virtio_has_feature(vdev, VIRTIO_BLK_F_MQ))
                virtio_cread(vdev, struct virtio_blk_config, num_queues,
          		     &num_vqs);
        else
                num_vqs = 1;

Or:
	err = virtio_cread_feature(vdev, VIRTIO_BLK_F_MQ,
			   struct virtio_blk_config, num_queues,
			   &num_vqs);
        if (err)
                num_vqs = 1;

Otherwise, the patch looks pretty straight-forward.

Cheers,
Rusty.

  parent reply	other threads:[~2014-06-16 12:47 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-13 17:29 [RFC PATCH 0/2] block: virtio-blk: support multi vq per virtio-blk Ming Lei
2014-06-13 17:29 ` Ming Lei
2014-06-13 17:29 ` [RFC PATCH 1/2] include/uapi/linux/virtio_blk.h: introduce feature of VIRTIO_BLK_F_MQ Ming Lei
2014-06-13 17:29   ` Ming Lei
2014-06-16 12:42   ` Rusty Russell
     [not found]   ` <1402680562-8328-2-git-send-email-ming.lei-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
2014-06-16 12:42     ` Rusty Russell
2014-06-16 12:42       ` Rusty Russell
2014-06-13 17:29 ` [RFC PATCH 2/2] block: virtio-blk: support multi virt queues per virtio-blk device Ming Lei
2014-06-13 17:29   ` Ming Lei
     [not found]   ` <1402680562-8328-3-git-send-email-ming.lei-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
2014-06-16 12:47     ` Rusty Russell [this message]
2014-06-16 12:47       ` Rusty Russell
2014-06-16 12:47   ` Rusty Russell
2014-06-17  2:40   ` Stefan Hajnoczi
2014-06-17  2:40     ` Stefan Hajnoczi
     [not found]     ` <CAJSP0QWaS--gPZ=ONFrXby1DQLw4R0RCro7bpHCdmucyjmqT_w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-06-17 15:50       ` Ming Lei
2014-06-17 15:50         ` Ming Lei
2014-06-17 15:53         ` Paolo Bonzini
2014-06-17 15:53           ` Paolo Bonzini
2014-06-17 16:00           ` Ming Lei
2014-06-17 16:00             ` Ming Lei
2014-06-17 16:34             ` Paolo Bonzini
2014-06-17 16:34               ` Paolo Bonzini
     [not found]               ` <53A06E05.9060708-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-06-18  4:04                 ` Ming Lei
2014-06-18  4:04                   ` Ming Lei
2015-12-14 10:31                   ` Paolo Bonzini
     [not found]                   ` <CACVXFVMkV5R5GUjM7Y-U54SA-ENZZ26dbbv4K2_OYPdmmiuUqg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-12-14 10:31                     ` Paolo Bonzini
2015-12-14 10:31                       ` Paolo Bonzini
2015-12-15  1:26                       ` Ming Lei
     [not found]                       ` <566E9A7E.3030203-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-12-15  1:26                         ` Ming Lei
2015-12-15  1:26                           ` Ming Lei
2014-06-18  4:04               ` Ming Lei
2014-06-17 15:50     ` Ming Lei
2014-06-13 17:35 ` [RFC PATCH 0/2] block: virtio-blk: support multi vq per virtio-blk Jens Axboe
2014-06-13 17:35   ` Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877g4hnhrq.fsf@rustcorp.com.au \
    --to=rusty-8n+1lvoiyb80n/f98k4iww@public.gmane.org \
    --cc=axboe-tSWWG44O7X1aa/9Udqfwiw@public.gmane.org \
    --cc=linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=ming.lei-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org \
    --cc=mst-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=pbonzini-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=stefanha-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=virtualization-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.