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 93BA7A056A; Tue, 3 Mar 2020 19:29:38 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id F0DC11C05C; Tue, 3 Mar 2020 19:29:12 +0100 (CET) Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) by dpdk.org (Postfix) with ESMTP id E0D6E1BFF2 for ; Tue, 3 Mar 2020 19:29:09 +0100 (CET) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20200303182909euoutp01c9848e588a2577787aba19edd2c2cced~43reo4Hj82026920269euoutp01Y for ; Tue, 3 Mar 2020 18:29:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20200303182909euoutp01c9848e588a2577787aba19edd2c2cced~43reo4Hj82026920269euoutp01Y DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1583260149; bh=Q1sEELbnScNmHsdQvI8BQT9Xv780c2E7fDa3/x8JCw4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sxzHvwt3U/EQ8FUQBvVXEMV20yl+6SUjPgiT34eFJtDmapZPoNZ+GnRvh1NjeLH1s Hq39OsP/Ja8Amw5j8CRgvFs4inHnb13qYQjlFKFR7gupJ+YuAeaYGb74jBo+R+mAHG Blg+ut0AS0MB33WJYebfO/s8JFNd2zt33dhjzgvI= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20200303182909eucas1p19761831ffee3ffd8e72019d70bf41123~43reXSPOP0553105531eucas1p1a; Tue, 3 Mar 2020 18:29:09 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id E3.C1.60698.4F1AE5E5; Tue, 3 Mar 2020 18:29:09 +0000 (GMT) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20200303182908eucas1p13a1c21150d9548cf62e3ed7079689270~43rdecwrM0544705447eucas1p1C; Tue, 3 Mar 2020 18:29:08 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20200303182908eusmtrp23bdc80323cb3485f0f0ff48d7b20453b~43rdd0DQb0347103471eusmtrp2m; Tue, 3 Mar 2020 18:29:08 +0000 (GMT) X-AuditID: cbfec7f5-a0fff7000001ed1a-a3-5e5ea1f4c7e4 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id E6.E4.08375.4F1AE5E5; Tue, 3 Mar 2020 18:29:08 +0000 (GMT) Received: from idyukov.rnd.samsung.ru (unknown [106.109.129.29]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20200303182907eusmtip1415cc51dd1a1cd0d9029e142b4fb3b3e~43rc_nxyM0781607816eusmtip1b; Tue, 3 Mar 2020 18:29:07 +0000 (GMT) From: Ivan Dyukov To: dev@dpdk.org, maxime.coquelin@redhat.com, tiwei.bie@intel.com, amorenoz@redhat.com, zhihong.wang@intel.com, xiaolong.ye@intel.com Cc: Ivan Dyukov Date: Tue, 3 Mar 2020 21:27:05 +0300 Message-Id: <20200303182846.26109-5-i.dyukov@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200303182846.26109-1-i.dyukov@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA0WSb0hTYRTGee+92+6G09vV8KSWsCg0SIuVzJAy6sMUgvoSUbi85m1Kbuqu mtaHLPwzbYkNyVAwNcTagsTm1cTECWkxsJJEYRbDTFraFtmwlWnb7qRvv3POc97n4fCSOO0j 4shCfRlr0DNFCrGM4Cf8U/t9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BlHzmVHi3eXZTCAJNgENidMd88CaRQT6GSU2/voN1sEsoCbxoec9C4gtLOAosed2BxuIzSKg KvH5dh8riM0rYCnRMe0g1AZ5idUbDoDZnAJWEifutLFAbGtglNiwazHLBEa+BYwMqxhFUkuL c9Nziw31ihNzi0vz0vWS83M3MQKDdduxn5t3MF7aGHyIUYCDUYmHV8IzLk6INbGsuDL3EKME B7OSCK8vZ3ScEG9KYmVValF+fFFpTmrxIUZToKsmMkuJJucDIymvJN7Q1NDcwtLQ3Njc2MxC SZy3Q+BgjJBAemJJanZqakFqEUwfEwenVAOjcuJy3m6JGanv09fNfzd5/3MJDpdUu+SfVuIV tW8PBa/K2rlYIp75SDCHrWx5B5tu1PTlBtEpG1NCrvL5HTb6+pdzX/J6oamlO47ddy+8rxul u+GR2G5Lp+mv7DWZr9gVNrw/YuafKth76duLxzznrjR5W29bva9uccZ729p5+8IcA28qn5FV YinOSDTUYi4qTgQAaT2jkGwCAAA= X-CMS-MailID: 20200303182908eucas1p13a1c21150d9548cf62e3ed7079689270 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20200303182908eucas1p13a1c21150d9548cf62e3ed7079689270 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20200303182908eucas1p13a1c21150d9548cf62e3ed7079689270 References: <20200303182846.26109-1-i.dyukov@samsung.com> Subject: [dpdk-dev] [PATCH v6 4/4] 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 0341907ef..6286286db 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. 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 074527714..45c1541c5 100644 --- a/drivers/net/virtio/virtio_user_ethdev.c +++ b/drivers/net/virtio/virtio_user_ethdev.c @@ -406,6 +406,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 }; @@ -738,4 +740,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