]> Git Repo - qemu.git/commit - hw/net/virtio-net.c
virtio-net: add linkspeed and duplex settings to virtio-net
authorJason Baron <[email protected]>
Thu, 8 Mar 2018 03:25:41 +0000 (22:25 -0500)
committerMichael S. Tsirkin <[email protected]>
Tue, 13 Mar 2018 21:09:49 +0000 (23:09 +0200)
commit9473939ed7addcaaeb8fde5c093918fb7fa0919c
treec11ed76a0835dc9ea9cd90e9ad12a0dcc75dbdac
parent127833eeea798b0863806341893cf575d2d29cf2
virtio-net: add linkspeed and duplex settings to virtio-net

Although linkspeed and duplex can be set in a linux guest via 'ethtool -s',
this requires custom ethtool commands for virtio-net by default.

Introduce a new feature flag, VIRTIO_NET_F_SPEED_DUPLEX, which allows
the hypervisor to export a linkspeed and duplex setting. The user can
subsequently overwrite it later if desired via: 'ethtool -s'.

Linkspeed and duplex settings can be set as:
'-device virtio-net,speed=10000,duplex=full'

where speed is [0...INT_MAX], and duplex is ["half"|"full"].

Signed-off-by: Jason Baron <[email protected]>
Cc: "Michael S. Tsirkin" <[email protected]>
Cc: Jason Wang <[email protected]>
Cc: [email protected]
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
hw/net/virtio-net.c
include/hw/virtio/virtio-net.h
This page took 0.026008 seconds and 4 git commands to generate.