From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43613) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1evrjl-00043u-7E for qemu-devel@nongnu.org; Tue, 13 Mar 2018 17:45:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1evrjk-0007kZ-Af for qemu-devel@nongnu.org; Tue, 13 Mar 2018 17:45:37 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:47174 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1evrjk-0007jC-3q for qemu-devel@nongnu.org; Tue, 13 Mar 2018 17:45:36 -0400 Date: Tue, 13 Mar 2018 23:45:35 +0200 From: "Michael S. Tsirkin" Message-ID: <1520977432-187679-17-git-send-email-mst@redhat.com> References: <1520977432-187679-1-git-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1520977432-187679-1-git-send-email-mst@redhat.com> Subject: [Qemu-devel] [PULL 16/22] standard-headers: update virtio_net.h List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Peter Maydell include speed/duplex fields Signed-off-by: Michael S. Tsirkin --- include/standard-headers/linux/virtio_net.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/include/standard-headers/linux/virtio_net.h b/include/standard-headers/linux/virtio_net.h index 30ff249..e9f255e 100644 --- a/include/standard-headers/linux/virtio_net.h +++ b/include/standard-headers/linux/virtio_net.h @@ -57,6 +57,8 @@ * Steering */ #define VIRTIO_NET_F_CTRL_MAC_ADDR 23 /* Set MAC address */ +#define VIRTIO_NET_F_SPEED_DUPLEX 63 /* Device set linkspeed and duplex */ + #ifndef VIRTIO_NET_NO_LEGACY #define VIRTIO_NET_F_GSO 6 /* Host handles pkts w/ any GSO type */ #endif /* VIRTIO_NET_NO_LEGACY */ @@ -76,6 +78,17 @@ struct virtio_net_config { uint16_t max_virtqueue_pairs; /* Default maximum transmit unit advice */ uint16_t mtu; + /* + * speed, in units of 1Mb. All values 0 to INT_MAX are legal. + * Any other value stands for unknown. + */ + uint32_t speed; + /* + * 0x00 - half duplex + * 0x01 - full duplex + * Any other value stands for unknown. + */ + uint8_t duplex; } QEMU_PACKED; /* -- MST