From mboxrd@z Thu Jan 1 00:00:00 1970 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ebkqL4tRB7lPuZEKFsJmh79Wz3jwFO9VrdiDP8ax7Y0=; b=t83hx1yGGBOH2yiS937sEm0sqmxbmpM30MO8NHoHDwWEegzJykdedFpSYsBO4u+5aL jag/MssvSjhSb2TEsvVOkIZx6VK0MesS5tauX81o+i+WdMyQ3UFWyMDIfjMH1ZmzcffB tdoMxjHohIWs8hZKJ9zIM07lQNx3+qyBYvplU6WmO/qFxxALC9n5AH8LfQzL8zbNQYb1 cWfPcwySiaGJnG1w1tuR3Sv6lypg682BbkCECH8YTfvHwuwGj53k52mruu8if5pj6JhN CLVXIbcMHR29Ene6m+jgU5w3XXJTVaEbSGraUp7jj3L6pK8uqGw+2TRb9+ibPXkhhrbR DQuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ebkqL4tRB7lPuZEKFsJmh79Wz3jwFO9VrdiDP8ax7Y0=; b=o85v4051R02P1D5MlYhqmLSNrX8x0RLZQS1xvenUdZnvzXGytECrWCPb5z95/ckxsq E/0iAs0i7rDizF+Xj8D5BEol8Aj3xbT0E90gljHm3Zrgo90gxfjNjLxttcS9VUnRPICD 09f1eMFTFtCZ3yaQQ6SAcvjbUaRgKjTGyDxxGVL0z3dOR1g3UYv1RbTjHgqVvhlYgEPX OgiqcYzHkiVyQ+ehAGwcAa6dQ7kQ32Mzbb4W9iVi4h0sBq+XTilsyabjAy/f1E/SS4wq 0eMqWp8ubAlLN/ayz6V3/z7LuHn5hsI1/LDa69ssurRLJIc1OIeE/ROx0b6LWp+PbEOo VYhQ== X-Gm-Message-State: AMke39nqwjNc+MDSd1gfVbKNLu8vXuEdImqslI0vfVMwx5O1t/4bWIKafS0enf1kmR4bNnZl X-Received: by 10.28.8.213 with SMTP id 204mr7126527wmi.100.1486724732018; Fri, 10 Feb 2017 03:05:32 -0800 (PST) Received: from XPS13.localdomain (184.203.134.77.rev.sfr.net. [77.134.203.184]) by smtp.gmail.com with ESMTPSA id m29sm2169030wrm.38.2017.02.10.03.05.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 10 Feb 2017 03:05:31 -0800 (PST) From: Thomas Monjalon To: ibarnea@cisco.com Cc: dev@dpdk.org Date: Fri, 10 Feb 2017 12:05:25 +0100 Message-Id: <1486724725-17410-1-git-send-email-thomas.monjalon@6wind.com> X-Mailer: git-send-email 2.7.0 In-Reply-To: <2185375.0v2z51C3zP@xps13> References: <2185375.0v2z51C3zP@xps13> Subject: [dpdk-dev] [PATCH v2] net/virtio: add speed capability X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Feb 2017 11:05:32 -0000 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