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: lkml <linux-kernel@vger.kernel.org>,
	"netdev\@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [PATCH 3/5] virtio: Don't expose legacy net features when VIRTIO_NET_NO_LEGACY defined.
Date: Mon, 16 Feb 2015 13:59:17 +1030	[thread overview]
Message-ID: <87y4ny8rg2.fsf@rustcorp.com.au> (raw)
In-Reply-To: <20150214204326.GA31803@redhat.com>

"Michael S. Tsirkin" <mst@redhat.com> writes:
> On Sun, Feb 08, 2015 at 11:59:08AM +0100, Michael S. Tsirkin wrote:
>> On Fri, Feb 06, 2015 at 03:36:54PM +1030, Rusty Russell wrote:
>> > In particular, the virtio header always has the u16 num_buffers field.
>> > We define a new 'struct virtio_net_modern_hdr' for this (rather than
>> > simply calling it 'struct virtio_net_hdr', to avoid nasty type errors
>> > if some parts of a project define VIRTIO_NET_NO_LEGACY and some don't.
>> 
>> This kind of masks the fact that it's the same as
>> virtio_net_hdr_mrg_rxbuf. So it's forcing people to duplicate
>> code for transitional devices.
>> 
>> How about
>> struct virtio_net_modern_hdr {
>> 	struct virtio_net_hdr_mrg_rxbuf hdr;
>> }
>> 
>> 
>> This will also make it look nicer when we start
>> adding stuff in the header, the main header
>> is separated in a struct by its own, so it's
>> easy to apply operations such as sizeof.
>
> Ping.
> Would you like a patch on top that does this?

Hmm, I thought I replied...

Indeed, I did.  I disagreed, and simply renamed struct
virtio_net_modern_hdr to virtio_net_hdr_v1.

Cheers,
Rusty.

  reply	other threads:[~2015-02-16  4:12 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-06  5:06 [PATCH 0/5] virtio 1.0 cleanups and one fix Rusty Russell
2015-02-06  5:06 ` [PATCH 1/5] virtio: define VIRTIO_PCI_CAP_PCI_CFG in header Rusty Russell
2015-02-08 11:00   ` Michael S. Tsirkin
2015-02-06  5:06 ` [PATCH 2/5] virtio: Don't expose legacy block features when VIRTIO_BLK_NO_LEGACY defined Rusty Russell
2015-02-08 11:01   ` Michael S. Tsirkin
2015-02-06  5:06 ` [PATCH 3/5] virtio: Don't expose legacy net features when VIRTIO_NET_NO_LEGACY defined Rusty Russell
2015-02-08 10:59   ` Michael S. Tsirkin
2015-02-08 23:50     ` Rusty Russell
2015-02-11  0:06       ` Rusty Russell
2015-02-16  5:14         ` Michael S. Tsirkin
2015-02-16  6:09           ` Rusty Russell
2015-02-14 20:43     ` Michael S. Tsirkin
2015-02-16  3:29       ` Rusty Russell [this message]
2015-02-06  5:06 ` [PATCH 4/5] virtio: Don't expose legacy config features when VIRTIO_CONFIG_NO_LEGACY defined Rusty Russell
2015-02-08 11:03   ` Michael S. Tsirkin
2015-02-06  5:06 ` [PATCH 5/5] virtio: don't require a config space on the console device Rusty Russell
2015-02-08 11:03   ` Michael S. Tsirkin
2015-02-08 23:56     ` Rusty Russell
2015-02-11 11:16       ` Amit Shah
2015-02-08  9:52 ` [PATCH 0/5] virtio 1.0 cleanups and one fix 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=87y4ny8rg2.fsf@rustcorp.com.au \
    --to=rusty@rustcorp.com.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=netdev@vger.kernel.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.