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 BA9F6A0524; Tue, 25 Feb 2020 08:31:38 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 74DF01BFED; Tue, 25 Feb 2020 08:31:15 +0100 (CET) Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by dpdk.org (Postfix) with ESMTP id BE7B81BFE8 for ; Tue, 25 Feb 2020 08:31:13 +0100 (CET) Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20200225073113euoutp02871b251b665ba96e9e3c472bce910a14~2lMBreTmM0387803878euoutp02- for ; Tue, 25 Feb 2020 07:31:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20200225073113euoutp02871b251b665ba96e9e3c472bce910a14~2lMBreTmM0387803878euoutp02- DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1582615873; bh=Q1sEELbnScNmHsdQvI8BQT9Xv780c2E7fDa3/x8JCw4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NvqxfSMX4v+sROomRtwugPqsTs6figO4KHhpBHYrw6mxFFkweIctwRdpjYnafaweD 1+zH7V+32b9LO4vvbbJuGnWkkRqRK9mhgH/xfXzFkcA6q8AysjC/Vsc5m3A0d8Z10p bys6+P+NxP8jneY7Nri4VXOQmwUrlSKaW0OhdLIQ= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20200225073113eucas1p2560b135286f965ead49546a5163bab10~2lMBhjV9s0347503475eucas1p27; Tue, 25 Feb 2020 07:31:13 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id 74.3A.61286.04DC45E5; Tue, 25 Feb 2020 07:31:13 +0000 (GMT) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20200225073112eucas1p2eb93d3723d3c417f82a2e8e230f79a9a~2lMBQ_d8b0348603486eucas1p2R; Tue, 25 Feb 2020 07:31:12 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20200225073112eusmtrp2839ff8654bf86a1a3fc3a97cd838c8a6~2lMBQc4JU0405804058eusmtrp2W; Tue, 25 Feb 2020 07:31:12 +0000 (GMT) X-AuditID: cbfec7f2-ef1ff7000001ef66-7c-5e54cd403c93 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 70.A9.07950.04DC45E5; Tue, 25 Feb 2020 07:31:12 +0000 (GMT) Received: from idyukov.rnd.samsung.ru (unknown [106.109.129.29]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20200225073112eusmtip215af1950f4f8b20f257d87a9875139f8~2lMAymrPA1922419224eusmtip2L; Tue, 25 Feb 2020 07:31:12 +0000 (GMT) From: Ivan Dyukov To: dev@dpdk.org, maxime.coquelin@redhat.com, tiwei.bie@intel.com, amorenoz@redhat.com, zhihong.wang@intel.com Cc: Ivan Dyukov Date: Tue, 25 Feb 2020 10:28:13 +0300 Message-Id: <20200225072813.9385-5-i.dyukov@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200225072813.9385-1-i.dyukov@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrLIsWRmVeSWpSXmKPExsWy7djPc7qOZ0PiDN5eYLRo3fGAxeLdp+1M FrMuNbFbHOvcw2KxteE/k8Xmi5OYHNg8fi1YyuqxeM9LJo/3+66yefRtWcUYwBLFZZOSmpNZ llqkb5fAlTHpwT/mgh98FY8nXWVpYFzO08XIwSEhYCLx7Gt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573LCC2sICjxL3+Y8wgM1kEVCVWNoKV 8ApYSJyYewBqvrzE6g0QNqeApcTmZ5PBbCGBHIkXD7ayTWDkW8DIsIpRJLW0ODc9t9hIrzgx t7g0L10vOT93EyMwOLcd+7llB2PXu+BDjAIcjEo8vBJ7g+OEWBPLiitzDzFKcDArifB6MwbF CfGmJFZWpRblxxeV5qQWH2I0BbppIrOUaHI+MHLySuINTQ3NLSwNzY3Njc0slMR5OwQOxggJ pCeWpGanphakFsH0MXFwSjUwGrou2Nq29MwzSacP5xr4Qz3mpRsYsi7h+XDmSWmy23SpxXvN IqfNfB6otc7B2Z6b89G1MINgt7eLruwWs3m9o/DV9pt3jX44n86Tun+jjzHp5b0gK1G5VKub cz33r3N13LtK9rWkmJ3lgt3C09Zl94R9u7HbK/ygyxJuyfNrPZiFu4WKLWffUmIpzkg01GIu Kk4EADUKYHtkAgAA X-CMS-MailID: 20200225073112eucas1p2eb93d3723d3c417f82a2e8e230f79a9a X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20200225073112eucas1p2eb93d3723d3c417f82a2e8e230f79a9a X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20200225073112eucas1p2eb93d3723d3c417f82a2e8e230f79a9a References: <20200225072813.9385-1-i.dyukov@samsung.com> Subject: [dpdk-dev] [PATCH v4 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