From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 21A97A0588; Thu, 16 Apr 2020 07:53:36 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0338E1DAA7; Thu, 16 Apr 2020 07:53:27 +0200 (CEST) Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by dpdk.org (Postfix) with ESMTP id E9DF91DAA3 for ; Thu, 16 Apr 2020 07:53:25 +0200 (CEST) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20200416055325euoutp02942ffd19a56dbf316cae431cf9793e40~GNwM6daUN0051900519euoutp02O for ; Thu, 16 Apr 2020 05:53:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20200416055325euoutp02942ffd19a56dbf316cae431cf9793e40~GNwM6daUN0051900519euoutp02O DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1587016405; bh=lo9diQK9xZnPLjWitJIBPywoBkLYx5/NMNUPMegTgq8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=BMWDanw+aGYRGrhU1CYq/dB2NJBuNk/4v/Inde2ApRVIY44VknnAmtPZKSfZX7d/g E9IBeEt+JgQa/QIWEfJK7lGuJHasR91wxGMdmHVV7baJQSpjnv60BjU5EACZuEmPjD 8rpZ/WxuKhQi84Uho6Gz7Gd26uVp4PjpDjii3M3E= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20200416055325eucas1p2390bb9c04800c91ef89f5573411169d6~GNwMlt3s31937219372eucas1p2I; Thu, 16 Apr 2020 05:53:25 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id 06.81.60698.5D2F79E5; Thu, 16 Apr 2020 06:53:25 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20200416055324eucas1p10b466945b7290cc1e742dd594e95da23~GNwMQQteG2727327273eucas1p1k; Thu, 16 Apr 2020 05:53:24 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20200416055324eusmtrp1422873d0d9e411d7a1851eddeaabda10~GNwMPpWs_2642726427eusmtrp1e; Thu, 16 Apr 2020 05:53:24 +0000 (GMT) X-AuditID: cbfec7f5-a29ff7000001ed1a-af-5e97f2d595a6 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id F1.6D.07950.4D2F79E5; Thu, 16 Apr 2020 06:53:24 +0100 (BST) Received: from idyukov.rnd.samsung.ru (unknown [106.109.129.29]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20200416055324eusmtip232ffc405f2707d2fc0d33f68eac3f8d7~GNwLofM0I2513525135eusmtip2B; Thu, 16 Apr 2020 05:53:24 +0000 (GMT) From: Ivan Dyukov To: dev@dpdk.org, maxime.coquelin@redhat.com, i.dyukov@samsung.com, v.kuramshin@samsung.com, amorenoz@redhat.com, zhihong.wang@intel.com, xiaolong.ye@intel.com, mb@smartsharesystems.com Date: Thu, 16 Apr 2020 08:53:01 +0300 Message-Id: <20200416055309.19679-2-i.dyukov@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200416055309.19679-1-i.dyukov@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA0WSXUhTcRjG+++cbcfl5DhHvmlazYo+1dBiSVSjkNGNQV1FmUsPKm1z7PiR diOVuZyK+AkWoZYfLHHi1ly5bAyc2sxSWRaURd04nS42rZwauc6ku9/7PM/7f+DlT2CCJTyK yFXmU2qlTC7i8HCTfeXtEae3KT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gRlvhzrYsNouYzo8Svu29YQBJsAhoSpzvmMYEkRASOM0r0zvrPBJIQFnCUmLBsFSOI zSKgKrH5/WY2EJtXwFLi1fptLBBT5SVWbzgAtoFTwEriQPcZsF4hgQyJxo5jTBMYeRcwMqxi FEktLc5Nzy020itOzC0uzUvXS87P3cQIDNNtx35u2cHY9S74EKMAB6MSD2/H62lxQqyJZcWV uYcYJTiYlUR4d/hPjxPiTUmsrEotyo8vKs1JLT7EaAp01ERmKdHkfGAM5ZXEG5oamltYGpob mxubWSiJ83YIHIwREkhPLEnNTk0tSC2C6WPi4JRqYJxxXuy6j/zzHecXaSdMfpPdV+L16GmI iZCBnPWeY4VRN9ZZXLzhsOL2p+T/gZJmMaE2OfJGi52vyXVrzf2ZE699Z3UrY/OnvuTjrwLt T8xbef+hCEOjzhm7Xaf92d6Jm2rNOJN5wEFijueKnYJtGqmCNZy5Qu915zXYNaeoXTyv2N7P tFqlV4mlOCPRUIu5qDgRANnAuAdpAgAA X-CMS-MailID: 20200416055324eucas1p10b466945b7290cc1e742dd594e95da23 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20200416055324eucas1p10b466945b7290cc1e742dd594e95da23 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20200416055324eucas1p10b466945b7290cc1e742dd594e95da23 References: <20191212085012.9170-1-i.dyukov@samsung.com> <20200416055309.19679-1-i.dyukov@samsung.com> Subject: [dpdk-dev] [PATCH v11 1/6] net/virtio: replace default virtio speed 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" This patch set speed to unknown Signed-off-by: Ivan Dyukov --- drivers/net/virtio/virtio_ethdev.c | 4 ++-- lib/librte_ethdev/rte_ethdev.h | 27 ++++++++++++++------------- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c index f9d0ea70d..e98a76ea2 100644 --- a/drivers/net/virtio/virtio_ethdev.c +++ b/drivers/net/virtio/virtio_ethdev.c @@ -2371,7 +2371,7 @@ virtio_dev_link_update(struct rte_eth_dev *dev, __rte_unused int wait_to_complet memset(&link, 0, sizeof(link)); link.link_duplex = ETH_LINK_FULL_DUPLEX; - link.link_speed = ETH_SPEED_NUM_10G; + link.link_speed = ETH_SPEED_NUM_UNKNOWN; link.link_autoneg = ETH_LINK_FIXED; if (!hw->started) { @@ -2427,7 +2427,7 @@ 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->speed_capa = ETH_LINK_SPEED_AUTONEG; /* fake value */ dev_info->max_rx_queues = RTE_MIN(hw->max_queue_pairs, VIRTIO_MAX_RX_QUEUES); diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h index d1a593ad1..a15ea572e 100644 --- a/lib/librte_ethdev/rte_ethdev.h +++ b/lib/librte_ethdev/rte_ethdev.h @@ -287,19 +287,20 @@ struct rte_eth_stats { /** * Ethernet numeric link speeds in Mbps */ -#define ETH_SPEED_NUM_NONE 0 /**< Not defined */ -#define ETH_SPEED_NUM_10M 10 /**< 10 Mbps */ -#define ETH_SPEED_NUM_100M 100 /**< 100 Mbps */ -#define ETH_SPEED_NUM_1G 1000 /**< 1 Gbps */ -#define ETH_SPEED_NUM_2_5G 2500 /**< 2.5 Gbps */ -#define ETH_SPEED_NUM_5G 5000 /**< 5 Gbps */ -#define ETH_SPEED_NUM_10G 10000 /**< 10 Gbps */ -#define ETH_SPEED_NUM_20G 20000 /**< 20 Gbps */ -#define ETH_SPEED_NUM_25G 25000 /**< 25 Gbps */ -#define ETH_SPEED_NUM_40G 40000 /**< 40 Gbps */ -#define ETH_SPEED_NUM_50G 50000 /**< 50 Gbps */ -#define ETH_SPEED_NUM_56G 56000 /**< 56 Gbps */ -#define ETH_SPEED_NUM_100G 100000 /**< 100 Gbps */ +#define ETH_SPEED_NUM_NONE 0 /**< Not defined */ +#define ETH_SPEED_NUM_10M 10 /**< 10 Mbps */ +#define ETH_SPEED_NUM_100M 100 /**< 100 Mbps */ +#define ETH_SPEED_NUM_1G 1000 /**< 1 Gbps */ +#define ETH_SPEED_NUM_2_5G 2500 /**< 2.5 Gbps */ +#define ETH_SPEED_NUM_5G 5000 /**< 5 Gbps */ +#define ETH_SPEED_NUM_10G 10000 /**< 10 Gbps */ +#define ETH_SPEED_NUM_20G 20000 /**< 20 Gbps */ +#define ETH_SPEED_NUM_25G 25000 /**< 25 Gbps */ +#define ETH_SPEED_NUM_40G 40000 /**< 40 Gbps */ +#define ETH_SPEED_NUM_50G 50000 /**< 50 Gbps */ +#define ETH_SPEED_NUM_56G 56000 /**< 56 Gbps */ +#define ETH_SPEED_NUM_100G 100000 /**< 100 Gbps */ +#define ETH_SPEED_NUM_UNKNOWN 0xffffffff /**< Unknown */ /** * A structure used to retrieve link-level information of an Ethernet port. -- 2.17.1