[lkml]   [2015]   [Feb]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 3/5] virtio: Don't expose legacy net features when VIRTIO_NET_NO_LEGACY defined.
"Michael S. Tsirkin" <> 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.


 \ /
  Last update: 2015-02-16 05:21    [W:0.069 / U:1.408 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site