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 4DA0AA0563; Wed, 15 Apr 2020 22:05:31 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B8E841DA30; Wed, 15 Apr 2020 22:04:52 +0200 (CEST) Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) by dpdk.org (Postfix) with ESMTP id 1763B1C195 for ; Wed, 15 Apr 2020 22:04:49 +0200 (CEST) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20200415200448euoutp0164a0893821ff86add4700a340b22068c~GFuRk_tQk2184721847euoutp01A for ; Wed, 15 Apr 2020 20:04:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20200415200448euoutp0164a0893821ff86add4700a340b22068c~GFuRk_tQk2184721847euoutp01A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1586981088; bh=CIdot3APO0NSk1er3ZveEoNqw+ETjJewupEppv9a4hA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=mGD8z6yuANNJUsOoulmtRQEAWmsraS7pirTHsUvmVjGhxbIGV1AxCy7Lx6OK4Z0qb k8/HYp8derYLUufv9Js68aqYB8/NQmKRQ6Fn/xFTom7cCb/ZgScKmVXxR10uRBR74g hbOK0gOmCRfk1Ny5Bp8KiBr9gTrYwvkrttcuCtI8= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20200415200448eucas1p12a14bbec62d768eb021d426121cb9e50~GFuRGBaMj0121901219eucas1p18; Wed, 15 Apr 2020 20:04:48 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id 83.59.61286.0E8679E5; Wed, 15 Apr 2020 21:04:48 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20200415200447eucas1p29e0efc7384df496cc7390ad5aa4891ea~GFuQGnIyE2719927199eucas1p2D; Wed, 15 Apr 2020 20:04:47 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20200415200447eusmtrp1ff194ad0464d60cb599964c8fe48d0c6~GFuQAd6p32198521985eusmtrp1n; Wed, 15 Apr 2020 20:04:47 +0000 (GMT) X-AuditID: cbfec7f2-ef1ff7000001ef66-49-5e9768e03216 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 4C.C8.08375.FD8679E5; Wed, 15 Apr 2020 21:04:47 +0100 (BST) Received: from idyukov.rnd.samsung.ru (unknown [106.109.129.29]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20200415200446eusmtip1b5c66633cfe770708ba4dbc9ee8c231f~GFuPaae-b1837018370eusmtip1X; Wed, 15 Apr 2020 20:04:46 +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:57 +0300 Message-Id: <20200415200423.6410-6-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: H4sIAAAAAAAAA0WSbUhTYRTHe3bv3e6W09smeJhSMBCyF5e90C1KS0MGgfUtCDLXvLrRnLbr lhqCiNrUspihKWFiaTIFQ4eO5mQMmuV8oaVY4DtCLDPJZZKZ5LyTvv3O7/zPc+DwkJgkgMtI rT6fMehVOjlfhPd6fo8endPUpx+b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RlvhzrYsNouYzo8S6+w0sIAk2AQ2J0x3zmEASIgLHGSV6Z/1nAkkICzhJdO+7C2az CKhKrPp0hRXE5hWwkPja/hBqqrzE6g0HwGxOAUuJbZcOsYHYQgLpEku6e5gmMPIuYGRYxSiS Wlqcm55bbKhXnJhbXJqXrpecn7uJERim24793LyD8dLG4EOMAhyMSjy8Ha+nxQmxJpYVV+Ye YpTgYFYS4d3hPz1OiDclsbIqtSg/vqg0J7X4EKMp0FETmaVEk/OBMZRXEm9oamhuYWlobmxu bGahJM7bIXAwBuiMxJLU7NTUgtQimD4mDk6pBsb2uBOJyQrSq5fsLNI7veRirMzU3j2/nTtl t67753A5abqCVNH8VJ2JF5I3bJ51ptd4lYPEV/2TwnxtW6Zll8qfa8i5V97VlWVpsiX83I7H dQE1GWpuqvp/eMp+zNs2ZYNKtQPbAsF3+49GdskvcNJOTdsrfyuUoauG7bVNU7A9o8qWr8tF fymxFGckGmoxFxUnAgDNwhTYaQIAAA== X-CMS-MailID: 20200415200447eucas1p29e0efc7384df496cc7390ad5aa4891ea X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20200415200447eucas1p29e0efc7384df496cc7390ad5aa4891ea X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20200415200447eucas1p29e0efc7384df496cc7390ad5aa4891ea References: <20191212085012.9170-1-i.dyukov@samsung.com> <20200415200423.6410-1-i.dyukov@samsung.com> Subject: [dpdk-dev] [PATCH v10 5/6] 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