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 37455A0577; Mon, 6 Apr 2020 10:59:49 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id CC6411BF92; Mon, 6 Apr 2020 10:59:22 +0200 (CEST) Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) by dpdk.org (Postfix) with ESMTP id 2C10B1BF54 for ; Mon, 6 Apr 2020 10:59:21 +0200 (CEST) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20200406085920euoutp01f8adf8533d2168bc2a2bc8fe6521396f~DL1rWDAfH2609826098euoutp01T for ; Mon, 6 Apr 2020 08:59:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20200406085920euoutp01f8adf8533d2168bc2a2bc8fe6521396f~DL1rWDAfH2609826098euoutp01T DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1586163560; bh=bXLo0J2tbNTVhA8KB4IwELBQ/GJ3UOXK5RMDs62/MQE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=QNdF0ObV603npJRX3HlkWQQH8vd2R+TwRWQCqtSu3loJxtu84dyFNyfImLgLeOK/M 970Ev8tR1HFGLlflCkAua/Z0VWNVT4/xrDX8N4iz7HlTOn64TMkstIfvVLBq+T81m8 u0ByFhFW6cBN0Hvtb8ucFtkUjHM+KkC1pgmFZW+s= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20200406085920eucas1p272ce14d6e3fe717f547cfde70c4a119b~DL1rF7zX52187321873eucas1p2r; Mon, 6 Apr 2020 08:59:20 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id A6.56.60698.86FEA8E5; Mon, 6 Apr 2020 09:59:20 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20200406085920eucas1p12f4a35578c4c741ee3d933120d25348e~DL1qx3t661458414584eucas1p1R; Mon, 6 Apr 2020 08:59:20 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20200406085920eusmtrp231cf6e01331ede8b06fd07b4bf53eb2f~DL1qxNGoz1429014290eusmtrp2j; Mon, 6 Apr 2020 08:59:20 +0000 (GMT) X-AuditID: cbfec7f5-a0fff7000001ed1a-bb-5e8aef681a55 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 03.BB.07950.86FEA8E5; Mon, 6 Apr 2020 09:59:20 +0100 (BST) Received: from idyukov.rnd.samsung.ru (unknown [106.109.129.29]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20200406085919eusmtip251e2d32fb457fc6e2add65f170acf78f~DL1qMhD3C2530225302eusmtip2Y; Mon, 6 Apr 2020 08:59:19 +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: Mon, 6 Apr 2020 11:58:02 +0300 Message-Id: <20200406085855.25773-5-i.dyukov@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200406085855.25773-1-i.dyukov@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrMIsWRmVeSWpSXmKPExsWy7djP87oZ77viDJ6sVbFo3fGAxeLdp+1M FrMuNbFbHOvcw2LR9+sqo8Xpm5vZLf68MbXYfHESkwOHx68FS1k9Fu95yeTxft9VNo++LasY PU496mYOYI3isklJz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cISf651QdV8ZpQ4cXk5O0iCTUBD4nTHPCaQhIjAcUaJ3ln/mUASwgKOEie3nmYEsVkE VCVerdnFCmLzClhKnH65ng1iqrzE6g0HwDZwClhJTNnzlwVksZBAhsTGh3kTGHkXMDKsYhRJ LS3OTc8tNtIrTswtLs1L10vOz93ECAzRbcd+btnB2PUu+BCjAAejEg8vw+3OOCHWxLLiytxD jBIczEoivFK9QCHelMTKqtSi/Pii0pzU4kOMpkA3TWSWEk3OB8ZPXkm8oamhuYWlobmxubGZ hZI4b4fAwRghgfTEktTs1NSC1CKYPiYOTqkGxk1zWtJOp7YvE/D3WJkllpb/4MUerrzlVvYi bDOcFr5a/boi5dvmyOhU2Yg5l57ZCbksPNjX0/B9u7LdtTt255kOL3KYsif9oFrBnL5ka6UQ s2Miz1eVxRW/fHula3FlgfxJXqlC73Wepu43zgasPbZZccd3W85rUsvucItEuBU+WFDHaxqz U4mlOCPRUIu5qDgRAMz9YL9nAgAA X-CMS-MailID: 20200406085920eucas1p12f4a35578c4c741ee3d933120d25348e X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20200406085920eucas1p12f4a35578c4c741ee3d933120d25348e X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20200406085920eucas1p12f4a35578c4c741ee3d933120d25348e References: <20191212085012.9170-1-i.dyukov@samsung.com> <20200406085855.25773-1-i.dyukov@samsung.com> Subject: [dpdk-dev] [PATCH v9 4/5] net/virtio-user: adding link speed devarg 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" virtio driver already parses speed devarg. virtio-user should add it to list of valid devargs and call eth_virtio_dev_init function which init speed value. eth_virtio_dev_init already is called from virtio_user_pmd_probe function. The only change is required to enable speed devargs: adding speed to list of valid devargs. Signed-off-by: Ivan Dyukov --- doc/guides/nics/virtio.rst | 8 ++++++++ drivers/net/virtio/virtio_user_ethdev.c | 5 ++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/doc/guides/nics/virtio.rst b/doc/guides/nics/virtio.rst index e579c6aa9..e70b6653b 100644 --- a/doc/guides/nics/virtio.rst +++ b/doc/guides/nics/virtio.rst @@ -410,6 +410,14 @@ Below devargs are supported by the virtio-user vdev: It is used to enable virtio device packed virtqueue feature. (Default: 0 (disabled)) +#. ``speed``: + + It is used to specify link speed of virtio device, in units of 1Mb. + Link speed is a part of link status structure. It could be requested + by application using rte_eth_link_get_nowait function. + (Default: 10000 (10G)) + + Virtio paths Selection and Usage -------------------------------- diff --git a/drivers/net/virtio/virtio_user_ethdev.c b/drivers/net/virtio/virtio_user_ethdev.c index a79f68a36..5b32d30fa 100644 --- a/drivers/net/virtio/virtio_user_ethdev.c +++ b/drivers/net/virtio/virtio_user_ethdev.c @@ -450,6 +450,8 @@ static const char *valid_args[] = { VIRTIO_USER_ARG_IN_ORDER, #define VIRTIO_USER_ARG_PACKED_VQ "packed_vq" VIRTIO_USER_ARG_PACKED_VQ, +#define VIRTIO_USER_ARG_SPEED "speed" + VIRTIO_USER_ARG_SPEED, NULL }; @@ -782,4 +784,5 @@ RTE_PMD_REGISTER_PARAM_STRING(net_virtio_user, "server=<0|1> " "mrg_rxbuf=<0|1> " "in_order=<0|1> " - "packed_vq=<0|1>"); + "packed_vq=<0|1> " + "speed="); -- 2.17.1