From: Ido Barnea Date: Thu, 2 Feb 2017 12:05:07 +0000 (+0000) Subject: net/virtio: add speed capability X-Git-Tag: spdx-start~4565 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=b392e9871d771a506a7aebf5545dbf08d79cb9e5;p=dpdk.git net/virtio: add speed capability The chosen fake capability (10G) is consistent with the reported link speed in virtio_dev_link_update(): link.link_speed = SPEED_10G; The feature is not marked in doc/guides/nics/features/virtio.ini because it is only a fake value. Signed-off-by: Ido Barnea [Thomas: comments added] Acked-by: Thomas Monjalon --- diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c index d1ff234202..4dc03b9cba 100644 --- a/drivers/net/virtio/virtio_ethdev.c +++ b/drivers/net/virtio/virtio_ethdev.c @@ -1835,6 +1835,8 @@ virtio_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) uint64_t tso_mask, host_features; struct virtio_hw *hw = dev->data->dev_private; + dev_info->speed_capa = ETH_LINK_SPEED_10G; /* fake value */ + dev_info->pci_dev = dev->device ? RTE_DEV_TO_PCI(dev->device) : NULL; dev_info->max_rx_queues = RTE_MIN(hw->max_queue_pairs, VIRTIO_MAX_RX_QUEUES);