[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v5] virtio-net: dynamic network offloads configu
Re: [Qemu-devel] [PATCH v5] virtio-net: dynamic network offloads configuration
Mon, 20 May 2013 09:24:26 -0500
Notmuch/0.15.2+77~g661dcf8 (http://notmuchmail.org) Emacs/23.3.1 (x86_64-pc-linux-gnu)
"Michael S. Tsirkin" <address@hidden> writes:
> On Mon, May 20, 2013 at 12:52:57PM +0200, Paolo Bonzini wrote:
>> Il 20/05/2013 10:18, Michael S. Tsirkin ha scritto:
>> > diff --git a/include/hw/virtio/virtio-net.h
>> > b/include/hw/virtio/virtio-net.h
>> > index beeead7..b315ac9 100644
>> > --- a/include/hw/virtio/virtio-net.h
>> > +++ b/include/hw/virtio/virtio-net.h
>> > @@ -31,6 +31,8 @@
>> > /* The feature bitmap for virtio net */
>> > #define VIRTIO_NET_F_CSUM 0 /* Host handles pkts w/ partial
>> > csum */
>> > #define VIRTIO_NET_F_GUEST_CSUM 1 /* Guest handles pkts w/ partial
>> > csum */
>> > +#define VIRTIO_NET_F_CTRL_GUEST_OFFLOADS 2 /* Control channel offload
>> > + * configuration support */
>> Any reason not to use 22?
> There are several
> - 22 is already used by VIRTIO_NET_F_MQ
> - guest drivers (in development) and spec upstream both use 2
>> Is there any hidden reason why bits 2..4 are not used in the spec?
> I don't know for sure, sorry.
When virtio-net was originally written, it had features for offload in
those bits. However, the original lguest implementation did not
implement those features so they only existed as feature bits.
After virtio-pci was introduced and we made a serious attempt to get
offload working, we discovered those feature were not sufficient to do
it. That lead to a new set of feature bits being introduced for
offload which is the set currently used.
This all predated the spec so by the time it was introduced, these bits
were already deprecated and therefore not included. They've never
actually been used in a real life implementation so there's no risk at
reusing them at this point.
> BTW please send questions on virtio spec on virtio
> mailing list, not here.