]> git.baikalelectronics.ru Git - kernel.git/commit
virtio_net: propagate linkspeed/duplex settings from the hypervisor
authorJason Baron <jbaron@akamai.com>
Fri, 5 Jan 2018 22:44:54 +0000 (17:44 -0500)
committerDavid S. Miller <davem@davemloft.net>
Tue, 9 Jan 2018 16:37:56 +0000 (11:37 -0500)
commit6702cc3d87946f5f23324d0fac9a83862181794e
tree525e76db6fc11077f8a83cb981710f3be82d862f
parente4e9d56ee189d95bfe491b327c096df77bd7831a
virtio_net: propagate linkspeed/duplex settings from the hypervisor

The ability to set speed and duplex for virtio_net is useful in various
scenarios as described here:

f932819 virtio_net: add ethtool support for set and get of settings

However, it would be nice to be able to set this from the hypervisor,
such that virtio_net doesn't require custom guest ethtool commands.

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'.

Note that VIRTIO_NET_F_SPEED_DUPLEX is defined as bit 63, the intention
is that device feature bits are to grow down from bit 63, since the
transports are starting from bit 24 and growing up.

Signed-off-by: Jason Baron <jbaron@akamai.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Jason Wang <jasowang@redhat.com>
Cc: virtio-dev@lists.oasis-open.org
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/virtio_net.c
include/uapi/linux/virtio_net.h