All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp.com.au>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	virtualization@lists.linux-foundation.org
Subject: Re: [PATCH] virtio-spec: add field for scsi command size
Date: Tue, 09 Jul 2013 10:49:11 +0930	[thread overview]
Message-ID: <87bo6cedio.fsf@rustcorp.com.au> (raw)
In-Reply-To: <20130708054406.GA7387@redhat.com>

"Michael S. Tsirkin" <mst@redhat.com> writes:
> On Mon, Jul 08, 2013 at 10:51:39AM +0930, Rusty Russell wrote:
>> "Michael S. Tsirkin" <mst@redhat.com> writes:
>> > On Thu, Jul 04, 2013 at 10:49:42AM +0300, Michael S. Tsirkin wrote:
>> >> > case).
>> >> > 
>> >> > Regrettably, initial driver implementations used simple layouts
>> >> > and devices came to rely on it, despite this specification 
>> >> > wording. It is thus recommended that drivers be conservative in 
>> >> > their assumptions, unless specific device features indicate that 
>> >> > general layout is permitted using VIRTIO_F_ANY_LAYOUT. In
>> >> > addition, some implementations may have large-but-reasonable
>> >> > restrictions on total descriptor size (such as based on IOV_MAX
>> >> > in the host OS). This has not been a problem in practice: little
>> >> > sympathy will be given to drivers which create unreasonably-sized
>> >> > descriptors such as dividing a network packet into 1500
>> >> > single-byte descriptors!
>> >> 
>> >> That's fine with me too.
>> >> So which bit are we using for this?
>> >> I'd like to rebase to latest bits and merge the optimization for 3.11.
>> >
>> >
>> > Rusty, could you please tell me which feature bit do you
>> > prefer for ANY_LAYOUT?
>> > It would be sad to miss another release of both qemu and kernel with
>> > this obvious optimization for the only reason we can't settle on a bit
>> > to use to signal it.
>> 
>> Let's use bit 30.  Here's the kernel patch:
>> 
>> virtio: VIRTIO_F_ANY_LAYOUT feature
>> 
>> Also known as the "no really, I read the spec" bit.
>> 
>> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
>
> This is already used in qemu:
> /* A guest should never accept this.  It implies negotiation is broken. */
> #define VIRTIO_F_BAD_FEATURE            30

How annoying.  Changed to bit 27, which isn't used.  Which forced a
rebase of my virtio-next tree, but I really don't want the old version
exposed in mainline, even for 3 commits.

Thanks,
Rusty.

commit 62525a00b87cc967bce9779d63fcc84fb9199130
Author: Rusty Russell <rusty@rustcorp.com.au>
Date:   Mon Jul 8 10:33:37 2013 +0930

    virtio: VIRTIO_F_ANY_LAYOUT feature
    
    Also known as the "no really, I read the spec" bit.
    
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

diff --git a/include/uapi/linux/virtio_config.h b/include/uapi/linux/virtio_config.h
index b7cda39..3ce768c 100644
--- a/include/uapi/linux/virtio_config.h
+++ b/include/uapi/linux/virtio_config.h
@@ -51,4 +51,7 @@
  * suppressed them? */
 #define VIRTIO_F_NOTIFY_ON_EMPTY	24
 
+/* Can the device handle any descriptor layout? */
+#define VIRTIO_F_ANY_LAYOUT		27
+
 #endif /* _UAPI_LINUX_VIRTIO_CONFIG_H */

  reply	other threads:[~2013-07-09  1:19 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-14 11:10 [PATCH] virtio-spec: add field for scsi command size Michael S. Tsirkin
2013-03-14 15:15 ` Paolo Bonzini
2013-03-14 17:39   ` Michael S. Tsirkin
2013-03-17  9:26     ` Michael S. Tsirkin
2013-06-13  4:42     ` Rusty Russell
2013-06-13  7:33       ` Michael S. Tsirkin
2013-06-13  8:02       ` Michael S. Tsirkin
2013-06-13  8:10         ` Michael S. Tsirkin
2013-06-17  6:37           ` Michael S. Tsirkin
2013-06-19  4:46             ` Rusty Russell
2013-06-19  8:24               ` Michael S. Tsirkin
2013-06-19  8:28                 ` Paolo Bonzini
2013-06-19  9:21                   ` Michael S. Tsirkin
2013-06-20  2:40                   ` Rusty Russell
2013-06-20  9:26                     ` Paolo Bonzini
2013-06-30 23:47                       ` Rusty Russell
2013-07-01 11:57                         ` Paolo Bonzini
2013-07-02  6:04                           ` Rusty Russell
2013-07-04  7:49                             ` Michael S. Tsirkin
2013-07-07 11:31                               ` Michael S. Tsirkin
2013-07-08  1:21                                 ` Rusty Russell
2013-07-08  5:44                                   ` Michael S. Tsirkin
2013-07-09  1:19                                     ` Rusty Russell [this message]
2013-07-04  7:39                           ` Michael S. Tsirkin
2013-07-04  9:05                             ` Paolo Bonzini
2013-07-08  4:28                               ` Rusty Russell
2013-07-04  7:38                         ` Michael S. Tsirkin
2013-06-20  2:45                 ` Rusty Russell
2013-03-18 21:47 ` Michael S. Tsirkin
2013-03-19  1:21   ` Rusty Russell
2013-03-19  7:58     ` Michael S. Tsirkin

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=87bo6cedio.fsf@rustcorp.com.au \
    --to=rusty@rustcorp.com.au \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=virtualization@lists.linux-foundation.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.