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 53A0BA0563; Wed, 15 Apr 2020 22:04:54 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 673B51DA11; Wed, 15 Apr 2020 22:04:44 +0200 (CEST) Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) by dpdk.org (Postfix) with ESMTP id AC60D1DA06 for ; Wed, 15 Apr 2020 22:04:41 +0200 (CEST) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20200415200441euoutp01b37f1b4e82460396805d8dc5f2330db2~GFuKdC75K2385023850euoutp01q for ; Wed, 15 Apr 2020 20:04:41 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20200415200441euoutp01b37f1b4e82460396805d8dc5f2330db2~GFuKdC75K2385023850euoutp01q DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1586981081; bh=lo9diQK9xZnPLjWitJIBPywoBkLYx5/NMNUPMegTgq8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=sBHH1JqSe2yWoN37r99H/ift85X4zah6R87zWy8uXoQdj9SU+K2VeaJNliIhd/a5j XdPGOaaL5u/rC8//vv3Og9Hpgm+HR7K3AukCxP7ACi1xyVmvRo63SQLL/oKUiypJLb FOIhUcLbz69GSF7xu08kSa5PlIrNi24xqsYNjOoo= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20200415200440eucas1p1a759efe55d2fb689df5fd9595635a947~GFuJzviFY0121801218eucas1p1-; Wed, 15 Apr 2020 20:04:40 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id 42.59.61286.8D8679E5; Wed, 15 Apr 2020 21:04:40 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20200415200440eucas1p2b403294b5d61d79bce402bc4a3f96de3~GFuJZv3wr1479314793eucas1p2T; Wed, 15 Apr 2020 20:04:40 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20200415200440eusmtrp1a3308ca228c208178c96a67e704e9895~GFuJZLthj2198521985eusmtrp1i; Wed, 15 Apr 2020 20:04:40 +0000 (GMT) X-AuditID: cbfec7f2-ef1ff7000001ef66-3f-5e9768d84ed0 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 2A.C8.08375.8D8679E5; Wed, 15 Apr 2020 21:04:40 +0100 (BST) Received: from idyukov.rnd.samsung.ru (unknown [106.109.129.29]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20200415200439eusmtip144742e861b4a9d37eba2ba18a83bd1b0~GFuI0wgFG1837018370eusmtip1U; Wed, 15 Apr 2020 20:04:39 +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: Wed, 15 Apr 2020 23:03:53 +0300 Message-Id: <20200415200423.6410-2-i.dyukov@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200415200423.6410-1-i.dyukov@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrEIsWRmVeSWpSXmKPExsWy7djP87o3MqbHGXxbJWPRuuMBi8W7T9uZ LGZdamK3ONa5h8Wi79dVRovTNzezW/x5Y2qx+eIkJgcOj18LlrJ6LN7zksnj/b6rbB59W1Yx epx61M0cwBrFZZOSmpNZllqkb5fAlf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eL60hNMIAk2AQ2J0x3zmEASIgLHGSV6Z/0HSwgLOEr8OboSzGYR UJXY1vsEzOYVsJA48XAmC8RUeYnVGw6AbeAUsJTYdukQG4gtJJAusaS7h2kCI+8CRoZVjCKp pcW56bnFhnrFibnFpXnpesn5uZsYgWG67djPzTsYL20MPsQowMGoxMPb8XpanBBrYllxZe4h RgkOZiUR3h3+0+OEeFMSK6tSi/Lji0pzUosPMZoCHTWRWUo0OR8YQ3kl8YamhuYWlobmxubG ZhZK4rwdAgdjgM5ILEnNTk0tSC2C6WPi4JRqYJy4VnJ6ltBM76RzqqvOv9sh+Tmq/m2E5fto /pb7MkWK+zdXro3qu1sSFzf9g2//Vt1l50+fLP7yfcvRnzqbP8x0Kf36vDJ/Eg/XNZOPGSqB PXufte5czHZOp/TVpMVHHJNKN56yrOSRLrS4pf7PoqjQP014278oxlyW1UIzJ0v2yqRcfvH/ gZcSS3FGoqEWc1FxIgBErPP6aQIAAA== X-CMS-MailID: 20200415200440eucas1p2b403294b5d61d79bce402bc4a3f96de3 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20200415200440eucas1p2b403294b5d61d79bce402bc4a3f96de3 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20200415200440eucas1p2b403294b5d61d79bce402bc4a3f96de3 References: <20191212085012.9170-1-i.dyukov@samsung.com> <20200415200423.6410-1-i.dyukov@samsung.com> Subject: [dpdk-dev] [PATCH v10 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