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 476E4A0588; Thu, 16 Apr 2020 14:44:21 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id BB56D1DC80; Thu, 16 Apr 2020 14:43:24 +0200 (CEST) Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by dpdk.org (Postfix) with ESMTP id 411E51DC72 for ; Thu, 16 Apr 2020 14:43:20 +0200 (CEST) Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20200416124320euoutp027f35488f08f59c77bd245fc63dd438d5~GTWGN-iqQ0059000590euoutp02U for ; Thu, 16 Apr 2020 12:43:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20200416124320euoutp027f35488f08f59c77bd245fc63dd438d5~GTWGN-iqQ0059000590euoutp02U DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1587041000; bh=CIdot3APO0NSk1er3ZveEoNqw+ETjJewupEppv9a4hA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=RmVSeVxD4x5vQEw/RNOdnOV5sRw/vFRK3pMxaTgzCFLPZdNDITuyOXajKchDLxwsS x397qydt8C1TtkMYiSHpdLQ/Sg0xCsv89E+BZg0wkoSDqRCzSQlutRBvUN8M5Xaj+c gloJq72gwk856PGPNao/N8xafVT10XODnJLsNxnk= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20200416124319eucas1p1bb68d1b1f226314ac823eb624e0eda68~GTWF_uUr61956319563eucas1p1i; Thu, 16 Apr 2020 12:43:19 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id 50.EE.61286.7E2589E5; Thu, 16 Apr 2020 13:43:19 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20200416124319eucas1p1465ff1637498a4d90f9da4b5e0524d41~GTWFoDMvV1449514495eucas1p1N; Thu, 16 Apr 2020 12:43:19 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20200416124319eusmtrp1a76ffbc8ad7976b162aca926574568df~GTWFnbUKX0947209472eusmtrp1N; Thu, 16 Apr 2020 12:43:19 +0000 (GMT) X-AuditID: cbfec7f2-f0bff7000001ef66-42-5e9852e70f31 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 04.D8.07950.7E2589E5; Thu, 16 Apr 2020 13:43:19 +0100 (BST) Received: from idyukov.rnd.samsung.ru (unknown [106.109.129.29]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20200416124318eusmtip2de040f66dab607f81d1e861104ceffab~GTWFB7JKn2230422304eusmtip2b; Thu, 16 Apr 2020 12:43:18 +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 15:42:57 +0300 Message-Id: <20200416124258.15549-7-i.dyukov@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200416124258.15549-1-i.dyukov@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrAIsWRmVeSWpSXmKPExsWy7djPc7rPg2bEGZw4rW/RuuMBi8W7T9uZ LGZdamK3ONa5h8Wi79dVRovTNzezW/x5Y2qx+eIkJgcOj18LlrJ6LN7zksnj/b6rbB59W1Yx epx61M0cwBrFZZOSmpNZllqkb5fAlfFwS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ouYzo8ScsxOYQBJsAhoSpzvmMYEkRASOM0r0zvoPlhAWcJI4faiTEcRm EVCVaJxwDWwor4ClREuzI8RQeYnVGw6ALeAUsJK42/2KFcQWEsiQWHjpMcsERt4FjAyrGEVS S4tz03OLjfSKE3OLS/PS9ZLzczcxAoN027GfW3Ywdr0LPsQowMGoxMObYD8jTog1say4MvcQ owQHs5IIL58pUIg3JbGyKrUoP76oNCe1+BCjKdBNE5mlRJPzgRGUVxJvaGpobmFpaG5sbmxm oSTO2yFwMEZIID2xJDU7NbUgtQimj4mDU6qB0UqOvZMnSb7AZrKSUNHduPSEM99ntHbMLgyd 8Vfj0eYDVxUqP+9bFn90VbWnkXdAgwjL65aUuftiu/bUGykz3roUtu8NAxeb4ZJ8uYzQ+2v6 zuqYSPz3e5z4nOeBj8OeAycnHi85duSmmNQJp/TIrTnu9S5Rk/bnlK/ew8S26Y/bztpg2a2N SizFGYmGWsxFxYkApjd2X2gCAAA= X-CMS-MailID: 20200416124319eucas1p1465ff1637498a4d90f9da4b5e0524d41 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20200416124319eucas1p1465ff1637498a4d90f9da4b5e0524d41 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20200416124319eucas1p1465ff1637498a4d90f9da4b5e0524d41 References: <20191212085012.9170-1-i.dyukov@samsung.com> <20200416124258.15549-1-i.dyukov@samsung.com> Subject: [dpdk-dev] [PATCH v12 6/7] 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 55bc6a267..451789705 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: 0xffffffff (Unknown)) + + 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