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 1A5BBA0588; Thu, 16 Apr 2020 07:54:15 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 000C81DAC8; Thu, 16 Apr 2020 07:53:34 +0200 (CEST) Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) by dpdk.org (Postfix) with ESMTP id 9D3291DAB9 for ; Thu, 16 Apr 2020 07:53:32 +0200 (CEST) Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20200416055332euoutp01b0b7e977f7e944ae52b1b94140ff9a5b~GNwTMe6Nc2272122721euoutp010 for ; Thu, 16 Apr 2020 05:53:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20200416055332euoutp01b0b7e977f7e944ae52b1b94140ff9a5b~GNwTMe6Nc2272122721euoutp010 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1587016412; bh=CIdot3APO0NSk1er3ZveEoNqw+ETjJewupEppv9a4hA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=hziFXW8XuJqc/6t6pRGWIc1Y9OGe/PGX4xiPBRdkjSpMe5yQWyfFLYrSvSG943GDm 2TtcmfgSKuSRO5FwT0Dk4rRtwmKvuWC+IixX1+YWbMURqyAR18bVCXOE22icwVUciG +8VBgjoGhCBSsl+U2SFO1O6zLo5ARX0cSHuVABCU= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20200416055332eucas1p19b7ce00c6dea6e87d76604db7d334e49~GNwS6tmr11378713787eucas1p1T; Thu, 16 Apr 2020 05:53:32 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id 16.85.60679.CD2F79E5; Thu, 16 Apr 2020 06:53:32 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20200416055331eucas1p1870fa45cd2d6876cff472763986dfd4e~GNwSaGPhZ2727327273eucas1p1o; Thu, 16 Apr 2020 05:53:31 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20200416055331eusmtrp1013433b930f42604e6b0802ea120e6e7~GNwSZgMen2731027310eusmtrp1D; Thu, 16 Apr 2020 05:53:31 +0000 (GMT) X-AuditID: cbfec7f4-0cbff7000001ed07-4f-5e97f2dc8b6e Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 53.FE.08375.BD2F79E5; Thu, 16 Apr 2020 06:53:31 +0100 (BST) Received: from idyukov.rnd.samsung.ru (unknown [106.109.129.29]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20200416055330eusmtip25d8e8a33c238eb26e99001a653396bb8~GNwRxjApl2529525295eusmtip2Y; Thu, 16 Apr 2020 05:53:30 +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 08:53:05 +0300 Message-Id: <20200416055309.19679-6-i.dyukov@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200416055309.19679-1-i.dyukov@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrCIsWRmVeSWpSXmKPExsWy7djPc7p3Pk2PM5jcx27RuuMBi8W7T9uZ LGZdamK3ONa5h8Wi79dVRovTNzezW/x5Y2qx+eIkJgcOj18LlrJ6LN7zksnj/b6rbB59W1Yx epx61M0cw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Ql/lzrYoOo+cwo8fhvGyNIgk1AQ+J0xzwmkISIwHFGid5Z/5lAEsICThI/Vv5gB7FZ BFQlFv08AmbzClhKLOndDjVVXmL1hgNgNqeAlcSB7jNgvUICGRKNHceYJjDyLmBkWMUoklpa nJueW2yoV5yYW1yal66XnJ+7iREYptuO/dy8g/HSxuBDjAIcjEo8vB2vp8UJsSaWFVfmHmKU 4GBWEuHd4T89Tog3JbGyKrUoP76oNCe1+BCjKdBRE5mlRJPzgTGUVxJvaGpobmFpaG5sbmxm oSTO2yFwMEZIID2xJDU7NbUgtQimj4mDU6qB0WH/n2eRmae3peSIX+34mmkwU+LhhCgONtYI k/7oN3urJqc2Ct/kOKtvs+9G/Z9/7ziCX299ZW3ZYGu3/M5T369CKZkTGfffqXhkdCH5rfu7 He7/9JR7jZrq0/pV+S5VOa63fdUeK/jOoXx21rXJ7OqTC6PtHRWWK2meN55ZX/q28r/j0041 JZbijERDLeai4kQAExaVwGkCAAA= X-CMS-MailID: 20200416055331eucas1p1870fa45cd2d6876cff472763986dfd4e X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20200416055331eucas1p1870fa45cd2d6876cff472763986dfd4e X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20200416055331eucas1p1870fa45cd2d6876cff472763986dfd4e References: <20191212085012.9170-1-i.dyukov@samsung.com> <20200416055309.19679-1-i.dyukov@samsung.com> Subject: [dpdk-dev] [PATCH v11 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