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 0248FA0562; Sun, 29 Mar 2020 16:44:58 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 63B471C0BD; Sun, 29 Mar 2020 16:43:48 +0200 (CEST) Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) by dpdk.org (Postfix) with ESMTP id 48ECC1C02A for ; Sun, 29 Mar 2020 16:43:40 +0200 (CEST) Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20200329144339euoutp015d8adf2ce4d5a45acfb309f72c703c6d~AzYBaFta12908129081euoutp01I for ; Sun, 29 Mar 2020 14:43:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20200329144339euoutp015d8adf2ce4d5a45acfb309f72c703c6d~AzYBaFta12908129081euoutp01I DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1585493020; bh=I9YXrBYTC5W24DxEpIEmAKswyLbTsR7EIwzmiLzk6XY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=ESQeocUuApKmt0p/0YBHkpzBaTMoxd2zvNJm+B5mCresJR0gXWAwd4EamTnlj4ixA FR19F31WktNSs2uFbNGpjXxfJQn8RMXh6URK8dOiDs+NH03qMdF15ams1KLqhNJONI yY0g2VwWm4i6Q+y/4HEzvWnXyHvzxIuqSutWyIrQ= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20200329144339eucas1p289cacc50caa72084d31ce76f05d470bf~AzYBRwl2D0846808468eucas1p2V; Sun, 29 Mar 2020 14:43:39 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id 62.A3.60679.B14B08E5; Sun, 29 Mar 2020 15:43:39 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20200329144338eucas1p1842eae4822199508ae611b4ee3b60441~AzYACmxXH1546415464eucas1p15; Sun, 29 Mar 2020 14:43:38 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20200329144338eusmtrp1ea3fd1c66714803a170c1d0e39f41681~AzYACDEUB1668216682eusmtrp1c; Sun, 29 Mar 2020 14:43:38 +0000 (GMT) X-AuditID: cbfec7f4-0cbff7000001ed07-76-5e80b41b7daa Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 1E.D6.08375.A14B08E5; Sun, 29 Mar 2020 15:43:38 +0100 (BST) Received: from idyukov.rnd.samsung.ru (unknown [106.109.129.29]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20200329144337eusmtip1379b7d90b5360a92b31f99fbdc0232f9~AzX-afFfX0278902789eusmtip1M; Sun, 29 Mar 2020 14:43:37 +0000 (GMT) From: Ivan Dyukov To: dev@dpdk.org, maxime.coquelin@redhat.com, i.dyukov@samsung.com, tiwei.bie@intel.com, amorenoz@redhat.com, zhihong.wang@intel.com, xiaolong.ye@intel.com Date: Sun, 29 Mar 2020 17:42:50 +0300 Message-Id: <20200329144308.5103-5-i.dyukov@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200329144308.5103-1-i.dyukov@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrJIsWRmVeSWpSXmKPExsWy7djPc7rSWxriDK4/17Vo3fGAxeLdp+1M FrMuNbFbHOvcw2KxteE/k8WfN6YWmy9OYnJg9/i1YCmrx+I9L5k83u+7yubRt2UVYwBLFJdN SmpOZllqkb5dAlfG5C1LWQt+8FUsuPOQsYFxOU8XIy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mVDSQhLOAocXrmHrBuFgFViWOTn4A18ApY SLz+t5YFYqq8xOoNB8BqOAUsJSa8vwtWIySQLnFw1wmmCYy8CxgZVjGKpJYW56bnFhvqFSfm Fpfmpesl5+duYgSG5LZjPzfvYLy0MfgQowAHoxIPr0FlfZwQa2JZcWXuIUYJDmYlEV42/4Y4 Id6UxMqq1KL8+KLSnNTiQ4ymQEdNZJYSTc4HxkteSbyhqaG5haWhubG5sZmFkjhvh8DBGKAz EktSs1NTC1KLYPqYODilGhgN1TjsgztaWMy/y/ZdKw55sOi9RsbC/256l1k4X2ZvKJ7tqXGo ULcgpF/O/+6djVYt2+cK7WJ52hv6ZXZw6U/mKcJWgockzoddZs8/WLc2SNX7Q53h7b2y8+wu OTU/UDI1vznplMPdXReO7HrJtU0/Ir/USnAynyJ3K6Ogsupp+cLdh5h5KpRYijMSDbWYi4oT ASQelxZfAgAA X-CMS-MailID: 20200329144338eucas1p1842eae4822199508ae611b4ee3b60441 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20200329144338eucas1p1842eae4822199508ae611b4ee3b60441 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20200329144338eucas1p1842eae4822199508ae611b4ee3b60441 References: <20191212085012.9170-1-i.dyukov@samsung.com> <20200329144308.5103-1-i.dyukov@samsung.com> Subject: [dpdk-dev] [PATCH v7 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 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 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