From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: [PATCH v2] net/virtio: add speed capability Date: Fri, 10 Feb 2017 12:05:25 +0100 Message-ID: <1486724725-17410-1-git-send-email-thomas.monjalon@6wind.com> References: <2185375.0v2z51C3zP@xps13> Cc: dev@dpdk.org To: ibarnea@cisco.com Return-path: Received: from mail-wm0-f42.google.com (mail-wm0-f42.google.com [74.125.82.42]) by dpdk.org (Postfix) with ESMTP id 444E9952 for ; Fri, 10 Feb 2017 12:05:32 +0100 (CET) Received: by mail-wm0-f42.google.com with SMTP id c85so256827958wmi.1 for ; Fri, 10 Feb 2017 03:05:32 -0800 (PST) In-Reply-To: <2185375.0v2z51C3zP@xps13> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Ido Barnea 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 as it is only a fake value. Signed-off-by: Ido Barnea [Thomas: comments added] Acked-by: Thomas Monjalon --- drivers/net/virtio/virtio_ethdev.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c index d1ff234..4dc03b9 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); -- 2.7.0