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 31BA6A0562; Thu, 2 Apr 2020 22:29:32 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7A8F61BFD1; Thu, 2 Apr 2020 22:29:31 +0200 (CEST) Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by dpdk.org (Postfix) with ESMTP id A98F21BF54 for ; Thu, 2 Apr 2020 22:29:29 +0200 (CEST) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20200402202928euoutp02c59de8d58ff8d227c9e38f234db01ee0~CGrGSNG_Q3102331023euoutp02j for ; Thu, 2 Apr 2020 20:29:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20200402202928euoutp02c59de8d58ff8d227c9e38f234db01ee0~CGrGSNG_Q3102331023euoutp02j DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1585859368; bh=eeYT0BeiROrj+tsJC+1oP6ZHC5sjSF2YZ/bnXWoMoAo=; h=Subject:To:Cc:From:Date:In-Reply-To:References:From; b=QtfYJVZ57+PCnPlhmBcVqHwkhNxGReIit+jIKVRAzQ+TCXMnX3UToCKr6O4apJ1Ru g2sy0mitEspFsyahyyFvSqB7kZ8+HElNKJ+1WnIcKI8+yjrpJIinlyYURxeyjmgqOO 1ChRMjU29BgeCSg5nTski9MEHKKgUWzGXlh/ABcg= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20200402202927eucas1p197edab1451aaa157581ad965eb4240f2~CGrFRGyI21447914479eucas1p1D; Thu, 2 Apr 2020 20:29:27 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id 73.04.60679.72B468E5; Thu, 2 Apr 2020 21:29:27 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20200402202926eucas1p23a8ec07859d6930cf16bc11f0df6a4fe~CGrEDTeO_2218322183eucas1p2j; Thu, 2 Apr 2020 20:29:26 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20200402202926eusmtrp1f000672138b2286bf3c56f2f20ba7493~CGrECqN2m0288602886eusmtrp1K; Thu, 2 Apr 2020 20:29:26 +0000 (GMT) X-AuditID: cbfec7f4-0cbff7000001ed07-41-5e864b27151b Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 98.90.08375.62B468E5; Thu, 2 Apr 2020 21:29:26 +0100 (BST) Received: from [106.109.129.29] (unknown [106.109.129.29]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20200402202925eusmtip18fa4ddd2eba26aead57d91b52aeb92ac~CGrDcvH0f3160831608eusmtip1i; Thu, 2 Apr 2020 20:29:25 +0000 (GMT) To: Thomas Monjalon Cc: dev@dpdk.org, maxime.coquelin@redhat.com, 'Vladimir Kuramshin' , amorenoz@redhat.com, zhihong.wang@intel.com, xiaolong.ye@intel.com, =?UTF-8?Q?Morten_Br=c3=b8rup?= , ferruh.yigit@intel.com, arybchenko@solarflare.com From: Ivan Dyukov Message-ID: <361c5dfb-5a2e-cb21-2eaa-1f4ffaca73b6@samsung.com> Date: Thu, 2 Apr 2020 23:29:25 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: <21725978.sM9OFumVh5@xps> Content-Transfer-Encoding: 8bit Content-Language: ru-RU X-Brightmail-Tracker: H4sIAAAAAAAAA02SaUgUcRjG++/M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Fou+X1cZLT49OMFicfrmZnaLP29MLTZfnMTkwOXxa8FSVo/Fe14y eRy7OY3d4/2+q2wefVtWMXqcetTN7LH6yQ+2APYoPZui/NKSVIWM/OISW6VoQwsjPUNLCz0j E0s9Q2PzWCsjUyV9O5uU1JzMstQifbsEvYxby9rYC67xV6ybdo2tgfEgTxcjJ4eEgInEvl3v WLoYuTiEBJYySnxf/4q1i5EDKCEh8foJM0SNsMSfa11sEDVvGSUmHbjHBlIjLOAhsWNfLkiN iICmxO3vsxhBapgFpjFJ/Jx5jxWi4RujROee5WCT2AQ0JE53zGMCsXkF7CS6rz9nAbFZBFQk 2n88ZgSxRQUiJB5PbGeEqBGUODnzCVgNp4CaRMOtN2A2s4CZxLzND5khbHmJ5q2zoWxxiQ/b D7JNYBSahaR9FpKWWUhaZiFpWcDIsopRJLW0ODc9t9hQrzgxt7g0L10vOT93EyMwTrcd+7l5 B+OljcGHGAU4GJV4eBkOtsYJsSaWFVfmHmKU4GBWEuF1nAEU4k1JrKxKLcqPLyrNSS0+xGgK 9NxEZinR5HxgCskriTc0NTS3sDQ0NzY3NrNQEuftEDgYIySQnliSmp2aWpBaBNPHxMEp1cDY zX4+YI1l6j2xSFaLcv+nr6YdbPFsYN+ls+Pr73uPKz+seST6bd+LOU/vVJmfXnhOQ+XofhHz 7RN5r+R0FYXL1fGmpKjdk2j5rKWUYn/M5PFevzUf9QX2NjMpb7v0+2Bp9v3ZkZ/Ee1m2dfEE PVq4sYxH/kzf4ZvRBod2MvC+mmKYqqnNv/mtEktxRqKhFnNRcSIAqfKQ3OkCAAA= X-CMS-MailID: 20200402202926eucas1p23a8ec07859d6930cf16bc11f0df6a4fe X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20200402173351eucas1p2c61c6b555fde0f757935c93bf8452be8 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20200402173351eucas1p2c61c6b555fde0f757935c93bf8452be8 References: <20191212085012.9170-1-i.dyukov@samsung.com> <2966019.2vfOZ694Ok@xps> <66962d3d-acee-1992-bf4c-e4954067b015@samsung.com> <21725978.sM9OFumVh5@xps> Subject: Re: [dpdk-dev] [PATCH v8 2/5] net/virtio: add 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" 02.04.2020 20:33, Thomas Monjalon пишет: > 02/04/2020 11:18, Ivan Dyukov: >> Hello Thomas, >> >> 01.04.2020 13:57, Thomas Monjalon пишет: >>> 30/03/2020 09:57, Ivan Dyukov: >>>> Some applications like pktgen use link speed to calculate >>>> transmission rate. It limits outcome traffic to hardcoded 10G. >>>> >>>> This patch adds speed devarg which allows to configure >>>> link speed of virtio device. >>> Is it really a good idea to fake such information? >>> Shouldn't it be managed differently in the application instead? >>> >>> >>> >> This is main stream of net devices. Device provides speed to >> application. Application calculates the packet rate. In case of virtio, >> speed is not limited by device. It could be specified by user. This >> patch just gives this posibility to user. > The other possibility is to return 0 meaning unknown speed. Yep. Right. Linux kernel virtio is implemented same way. They return -1, if user haven't specified other. Legacy dpdk virtio code was always returned 10G speed before my patchset and I just keep this value to prevent breakages in applications like pktgen. > I don't see why this information should be saved in the driver space. The speed could be provided by qemu. Please see 5th patch in my patchset. It's not good idea to smash this code accross application and driver side. > The user can give this information to the application, > it would look more correct to me. > Note: the application is controlling the devargs passed to the driver, > so it can intercept such information. These changes are specific only for virtio driver. If application will treat speed argument, then it also should check that current driver is virtio and same code will be duplicated in every application. > > I understand it is easier to have the speed info at the same place > in all cases. But it avoids differentiating what is a reliable info, > and what is user-provided info. > > >