On 03/18/2016 12:17 PM, Wei Xu wrote: >>>>> >>>>> +static ssize_t virtio_net_receive(NetClientState *nc, >>>>> + const uint8_t *buf, size_t size) >>>>> +{ >>>>> + if (virtio_net_rsc_bypass) { >>>>> + return virtio_net_do_receive(nc, buf, size); >>>> You need a feature bit for this and compat it for older machine types. >>>> And also need some work on virtio spec I think. >>> yes, not sure which way is good to support this, hmp/qmp/ethtool, this >>> is gonna to support win guest, >>> so need a well-compatible interface, any comments? >> I think this should be implemented through feature bits/negotiation >> instead of something like ethtool. > Looks this feature should be turn on/off dynamically due to the spec, > so maybe this should be managed from the guest, is there any reference > code for this?
Then you may want to look at implementation of VIRTIO_NET_F_CTRL_GUEST_OFFLOADS.