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 5D4F0A055F; Thu, 27 Feb 2020 15:20:55 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D9C001BFE6; Thu, 27 Feb 2020 15:20:30 +0100 (CET) Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by dpdk.org (Postfix) with ESMTP id 6C59C1BFDD for ; Thu, 27 Feb 2020 15:20:27 +0100 (CET) Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20200227142027euoutp0254a9ad7a68b71e1af0ea05a8630dbaef~3SD55ce772266722667euoutp02A for ; Thu, 27 Feb 2020 14:20:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20200227142027euoutp0254a9ad7a68b71e1af0ea05a8630dbaef~3SD55ce772266722667euoutp02A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1582813227; bh=Q1sEELbnScNmHsdQvI8BQT9Xv780c2E7fDa3/x8JCw4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cIEMJcwS/1nyLlOwovMAlxEprh84pP/RG4LpQSoGjxLOJbyK+0g5/V1NNY9uVXAZt j9ZRLQpHxpC92AcPqxeD9E/wiRHmIYwF/w6bpxGPMSZ4upT1X35Gd61XctXCc5PPyF TzWSVn0CrB4zqcNoNdvaGoZUhuuDYuLF0gajImPc= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20200227142027eucas1p1278617860f273e6d97d979fd29fbd106~3SD5vZ7Ex1697716977eucas1p1b; Thu, 27 Feb 2020 14:20:27 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id 78.84.60679.A20D75E5; Thu, 27 Feb 2020 14:20:26 +0000 (GMT) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20200227142026eucas1p2101b3ca97559c155fc34cfbdec8cbdbc~3SD5LCB4D0353803538eucas1p2J; Thu, 27 Feb 2020 14:20:26 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20200227142026eusmtrp2dfa2fa6112bc7aaf548ba5f3f6f9fad3~3SD5Kd6ri2814228142eusmtrp2k; Thu, 27 Feb 2020 14:20:26 +0000 (GMT) X-AuditID: cbfec7f4-0e5ff7000001ed07-6d-5e57d02aea7b Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 6F.89.08375.A20D75E5; Thu, 27 Feb 2020 14:20:26 +0000 (GMT) Received: from idyukov.rnd.samsung.ru (unknown [106.109.129.29]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20200227142025eusmtip2be7b12824084939ef5c0885213189815~3SD4k2Y9L0655806558eusmtip2d; Thu, 27 Feb 2020 14:20:25 +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: Thu, 27 Feb 2020 17:16:16 +0300 Message-Id: <20200227141840.15835-5-i.dyukov@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200227141840.15835-1-i.dyukov@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrEIsWRmVeSWpSXmKPExsWy7djPc7paF8LjDA4ft7Bo3fGAxeLdp+1M FrMuNbFbHOvcw2KxteE/k8WfN6YWmy9OYnJg9/i1YCmrx+I9L5k83u+7yubRt2UVYwBLFJdN SmpOZllqkb5dAlfGpA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A1nxklVr3/xwKSYBPQkDjdMY8JJCEi0M8osfHXb7AOZgE1iQ8978GKhAUcJRrfLGIHsVkE VCW6rrQygdi8ApYSF1/vYofYIC+xesMBsF5OASuJ+S3vGEFsIYF4iY/fz7NPYORbwMiwilEk tbQ4Nz232FCvODG3uDQvXS85P3cTIzBUtx37uXkH46WNwYcYBTgYlXh4F+wIjxNiTSwrrsw9 xCjBwawkwrvxa2icEG9KYmVValF+fFFpTmrxIUZToKMmMkuJJucD4yivJN7Q1NDcwtLQ3Njc 2MxCSZy3Q+BgjJBAemJJanZqakFqEUwfEwenVAOj8aTlr1SzLggclfviVJiZdEJq+ZRdkx/d 9HTlbttescns2KP+j/2O+bmLq06vadH8XxqY+od/7cHeO7nNdyY0Hn6flaOZejQ17cKcz4yf 2vd4yUot+W79aIZwvEvJu6fszDVLYqt2PDaVEa+y33flxfWNn+xF5kzcliApdE5mX70F7wLD g0qZSizFGYmGWsxFxYkAFeK9XWsCAAA= X-CMS-MailID: 20200227142026eucas1p2101b3ca97559c155fc34cfbdec8cbdbc X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20200227142026eucas1p2101b3ca97559c155fc34cfbdec8cbdbc X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20200227142026eucas1p2101b3ca97559c155fc34cfbdec8cbdbc References: <20200226075503.GA108150@intel.com> <20200227141840.15835-1-i.dyukov@samsung.com> Subject: [dpdk-dev] [PATCH v5 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