Skip to content

virtio_net: allow hypervisor to indicate linkspeed and duplex setting

Jason Baron netdev qemu-devel virtio-dev virtualization 4 versions – Applied

Status from this message: Applied, thanks Jason.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest3 patches 4 repliesApplied
  2. v33 patches 15 repliesSuperseded
  3. v23 patches 9 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v12 patches15 repliesSuperseded

Changes in v4 from the cover letter

* break the speed/duplex read into a function and also call from virtnet_probe when status bit is not negotiated
* only do speed/duplex read in virtnet_config_changed_work() on LINK_UP

Patches in v4 Applied

#Subject and filesSizeRepliesApplied
1/3virtio_net: propagate linkspeed/duplex settings from the hypervisordrivers/net/virtio_net.c include/uapi/linux/virtio_net.h+35 -12 replies
2/3qemu: virtio-net: use 64-bit values for feature flagshw/net/virtio-net.c include/hw/virtio/virtio-net.h+29 -280 replies
3/3qemu: add linkspeed and duplex settings to virtio-nethw/net/virtio-net.c include/hw/virtio/virtio-net.h include/standard-headers/linux/virtio_net.h +1 more+49 -02 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v4 yet.

Read the v4 thread

Cover letter [PATCH v4 0/3] virtio_net: allow hypervisor to indicate linkspeed and duplex setting

We have found it useful to be able to set the linkspeed and duplex settings from the host-side for virtio_net. This obviates the need for guest changes and settings for these fields, and does not require custom ethtool commands for virtio_net.

The ability to set linkspeed and duplex is useful in various cases as described here:

16032be virtio_net: add ethtool support for set and get of settings

Using 'ethtool -s' continues to over-write the linkspeed/duplex settings with this patch.

The 1/3 patch is against net-next, while the 2-3/3 patch are the associated qemu changes that would go in after as update-linux-headers.sh should be run first. So the qemu patches are a demonstration of how I intend this to work.

Thanks,

-Jason

linux changes:

changes from v3:
* break the speed/duplex read into a function and also call from virtnet_probe when status bit is not negotiated
* only do speed/duplex read in virtnet_config_changed_work() on LINK_UP

changes from v2:
* move speed/duplex read into virtnet_config_changed_work() so link up changes are detected

Jason Baron (1):
virtio_net: propagate linkspeed/duplex settings from the hypervisor

 drivers/net/virtio_net.c        | 23 ++++++++++++++++++++++-
 include/uapi/linux/virtio_net.h | 13 +++++++++++++
 2 files changed, 35 insertions(+), 1 deletion(-)

qemu changes:

Jason Baron (2):
qemu: virtio-net: use 64-bit values for feature flags
qemu: add linkspeed and duplex settings to virtio-net

 hw/net/virtio-net.c                         | 87 ++++++++++++++++++++---------
 include/hw/virtio/virtio-net.h              |  5 +-
 include/standard-headers/linux/virtio_net.h | 13 +++++
 3 files changed, 77 insertions(+), 28 deletions(-)
Signature · 1 line
2.6.1