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 700F5A0562; Mon, 30 Mar 2020 09:59:02 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D58231C0B0; Mon, 30 Mar 2020 09:58:36 +0200 (CEST) Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by dpdk.org (Postfix) with ESMTP id AB9B61C08E for ; Mon, 30 Mar 2020 09:58:33 +0200 (CEST) Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20200330075833euoutp020fdd734cdf169b3fcb25b80c4eac71a1~BBfmfBFEU0192101921euoutp02Y for ; Mon, 30 Mar 2020 07:58:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20200330075833euoutp020fdd734cdf169b3fcb25b80c4eac71a1~BBfmfBFEU0192101921euoutp02Y DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1585555113; bh=I9YXrBYTC5W24DxEpIEmAKswyLbTsR7EIwzmiLzk6XY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=GsWt3I0Cw7i6L/GS2xtjsV42eTUuo1+lekNTiDSBvYWPE0kzks/dI2V7cc5nqAMz/ bCRLvSp2pF7LvBgLu+WEPekfP5tSf+s51l64bYWDfguMRL1pGgZd6jEuudV9eBgpv+ eCVXtrWtmxMH1CauQaaHqwto/2ruX107l4FQeJPc= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20200330075833eucas1p20eb1537cf99a81f94c823cf5da9c65c3~BBfmUpc8f3250232502eucas1p2n; Mon, 30 Mar 2020 07:58:33 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id 89.3B.60698.9A6A18E5; Mon, 30 Mar 2020 08:58:33 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20200330075832eucas1p295cdf00368bb91a1ecec202f1cd3624a~BBfl_q4V90484204842eucas1p2K; Mon, 30 Mar 2020 07:58:32 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20200330075832eusmtrp193a533817d15ff664140748981aff95c~BBfl_FWyr2774027740eusmtrp1j; Mon, 30 Mar 2020 07:58:32 +0000 (GMT) X-AuditID: cbfec7f5-a0fff7000001ed1a-c8-5e81a6a9391d Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id C4.AE.08375.8A6A18E5; Mon, 30 Mar 2020 08:58:32 +0100 (BST) Received: from idyukov.rnd.samsung.ru (unknown [106.109.129.29]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20200330075832eusmtip24fa52902047046c716a798df257ef6a1~BBflctTkU0100701007eusmtip2r; Mon, 30 Mar 2020 07:58:32 +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: Mon, 30 Mar 2020 10:58:01 +0300 Message-Id: <20200330075814.6857-5-i.dyukov@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200330075814.6857-1-i.dyukov@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrJIsWRmVeSWpSXmKPExsWy7djP87orlzXGGcx6LmDRuuMBi8W7T9uZ LGZdamK3ONa5h8Via8N/Jos/b0wtNl+cxOTA7vFrwVJWj8V7XjJ5vN93lc2jb8sqxgCWKC6b lNSczLLUIn27BK6MyVuWshb84KtYcOchYwPjcp4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wn2UEGsQioSsw6YQUS5hWw kLh8fhUrxFB5idUbDoDN4RSwlDgzcSsTiC0kkC7ReLuDaQIj7wJGhlWMIqmlxbnpucWGesWJ ucWleel6yfm5mxiBAbnt2M/NOxgvbQw+xCjAwajEwztja0OcEGtiWXFl7iFGCQ5mJRFeNn+g EG9KYmVValF+fFFpTmrxIUZToJsmMkuJJucDoyWvJN7Q1NDcwtLQ3Njc2MxCSZy3Q+BgDNAZ iSWp2ampBalFMH1MHJxSDYxJSr9mXGm7XL22JbZTpG3d1PlnTy86ajnzlLyLyeW0kt47axlD 3t/ZcLLcotJ0qUKl7eJnN8SiWY7xrJt8OsWn8UFgW0VXkbBA+7P9QpOOMj74+OUqm95sxWhu rZ/71S6LLqmpC1VT4FvOmvmiQaXr4Y3nvb4r+5K1bPZstsyZHr9W+swvmwolluKMREMt5qLi RABX+n2EXgIAAA== X-CMS-MailID: 20200330075832eucas1p295cdf00368bb91a1ecec202f1cd3624a X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20200330075832eucas1p295cdf00368bb91a1ecec202f1cd3624a X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20200330075832eucas1p295cdf00368bb91a1ecec202f1cd3624a References: <20191212085012.9170-1-i.dyukov@samsung.com> <20200330075814.6857-1-i.dyukov@samsung.com> Subject: [dpdk-dev] [PATCH v8 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