net/virtio: fix default duplex mode
[dpdk.git] / drivers / net / virtio / virtio_ethdev.c
index 72d3dda..e58085a 100644 (file)
@@ -1901,6 +1901,7 @@ eth_virtio_dev_init(struct rte_eth_dev *eth_dev)
        if (ret < 0)
                return ret;
        hw->speed = speed;
+       hw->duplex = DUPLEX_UNKNOWN;
 
        /* Allocate memory for storing MAC addresses */
        eth_dev->data->mac_addrs = rte_zmalloc("virtio",
@@ -2504,6 +2505,7 @@ virtio_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
        dev_info->min_rx_bufsize = VIRTIO_MIN_RX_BUFSIZE;
        dev_info->max_rx_pktlen = VIRTIO_MAX_RX_PKTLEN;
        dev_info->max_mac_addrs = VIRTIO_MAX_MAC_ADDRS;
+       dev_info->max_mtu = hw->max_mtu;
 
        host_features = VIRTIO_OPS(hw)->get_features(hw);
        dev_info->rx_offload_capa = DEV_RX_OFFLOAD_VLAN_STRIP;