From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2D84FA0A0E; Wed, 28 Apr 2021 10:45:43 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E95BE4014E; Wed, 28 Apr 2021 10:45:42 +0200 (CEST) Received: from mail-lj1-f170.google.com (mail-lj1-f170.google.com [209.85.208.170]) by mails.dpdk.org (Postfix) with ESMTP id 5E08B40147 for ; Wed, 28 Apr 2021 10:45:42 +0200 (CEST) Received: by mail-lj1-f170.google.com with SMTP id z23so24855948lji.4 for ; Wed, 28 Apr 2021 01:45:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=L9AtBLi5dDotA1p2XeIyOVGHLp/AZ0PkNO6pRHliOcI=; b=oFqcpNu4jUYUy64oentqQ6Syc4SHMRAX1gtV1RXWVB+XjKikY69nSZkWHd+n5aKe0W ym9u7D9ZLs88sDvEjS9GPCytq2jHxNh6ctWf0gVndYA+S5T0FloyHtQToH1U46avRMud nYCMbop01JgF5JD0ennsOb/hDwUl7pzeUaH0Gh/6T+ETQlDPEaEJLRnJyHxeuj9BcL0n i7OWP8FuWl7YJYO2U7jIRMLMPDEwXft3Gsy9nWb8ZEPz9t8WMHbpC/FDkqkJ6RoUrYEr ja19f/axTI9B39E6ux9WSdH/FvzVPO/vsG6jWMCz+zM/mA2GPlDqc6eOhF7JFQGgEMAu xkDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=L9AtBLi5dDotA1p2XeIyOVGHLp/AZ0PkNO6pRHliOcI=; b=RlNv8/bXHhS4m8eyf1G4vrQAz2908JtJUsP1CL7qcPLcKz0lG6yxoYmEEd5gnBO7U5 orMyoK+iiDRtydnN0+P+JKsgUBrsFHwJcRFdaiOwjwv+3jBSO4rBCuKcKZjGCKzjSI8t sxc3eslyvoJ3D6SiIq+UYijCWXkupNynstr28/yIS64yPdoWxztg6yAMCYnwYaXut1v8 yknBn59gQsEfPBXRIU9XtEAR/Ap6klsY/r9ZHkft87osxnXrjdY0aSFwSKkKb0qW4tpJ CRTTdXX+j39/xQDByQKfzn1+1J9Sf4gm+qzMCsw2CbcO6btRvvZte/wu4AKk0HceXnBp q5gg== X-Gm-Message-State: AOAM531k1L3J7x4XdcnRsu6WMfOT7n6kPUBxwesPIM8xeHEwscXz3LRk l+O13LekvisuttBnLFAEu4Y= X-Google-Smtp-Source: ABdhPJyLdPkAqtUERBqIf7KubpKPEp1P6aH18Dty6/+OHUMoxAd6MkwMjlqyvVcMNcmCrbia21kIKg== X-Received: by 2002:a2e:a552:: with SMTP id e18mr19927009ljn.383.1619599541908; Wed, 28 Apr 2021 01:45:41 -0700 (PDT) Received: from sovereign (broadband-37-110-65-23.ip.moscow.rt.ru. [37.110.65.23]) by smtp.gmail.com with ESMTPSA id c5sm558489lfk.141.2021.04.28.01.45.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Apr 2021 01:45:41 -0700 (PDT) Date: Wed, 28 Apr 2021 11:45:40 +0300 From: Dmitry Kozlyuk To: Thomas Monjalon Cc: Tyler Retzlaff , Jie Zhou , Tal Shnaiderman , "dev@dpdk.org" , "xiaoyun.li@intel.com" , "Kadam, Pallavi" , "bruce.richardson@intel.com" , "ferruh.yigit@intel.com" , "david.marchand@redhat.com" Message-ID: <20210428114540.5d4bc1c5@sovereign> In-Reply-To: <1624822.LYVHZhtJzb@thomas> References: <1618594501-23795-10-git-send-email-jizh@linux.microsoft.com> <3990047.YzQW8q25Qq@thomas> <1624822.LYVHZhtJzb@thomas> X-Mailer: Claws Mail 3.17.6 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [EXTERNAL] Re: [PATCH v5 5/9] app/testpmd: add clock_gettime_monotonic X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" 2021-04-19 21:41 (UTC+0200), Thomas Monjalon: > 19/04/2021 20:34, Tyler Retzlaff: > > > > Originally and internally, the function was added into eal. But then > > > > restricted the functionality just inside testpmd to avoid currently > > > > seems unnecessary version change, per a discussion in community meeting > > > > several weeks back. If we believe eal support of clock_gettime for > > > > windows will benefit other drivers/apps now instead of future when real > > > > need comes up, I can move it back into eal. DmitryK and Tyler, any > > > > conern or inputs here? > > > > > > My point of view: > > > A test application is also testing the API availability. > > > Here it shows something is missing in EAL. > > > Instead of workarounding in the test application, it should direct you to > > > fixing EAL. > > > > I think we have discussed to some degree in other threads but the more POSIX interfaces that get integrated into eal with an 'rte_' namespace pasted on to the front of them causes the scale of making DPDK portable grows. If individual applications need portable/cross platform APIs like they should look to other packages tailored for the job instead of trying to put everything into DPDK. Threads is an example of where this has gone wrong, I don't think doing more of it is going to be beneficial. > > > > Shouldn't EAL be in the business of being DPDK and do it well instead of an all encompassing cross-platform application development kit? > > Yes good point. While Tyler's point is valid in general, monotonic time is something required in many PMDs for timeouts. App networking code often deals with timeouts, too. There's already a patch adding clock_gettime(): http://patchwork.dpdk.org/project/dpdk/patch/1619597563-56716-1-git-send-email-humin29@huawei.com/ Luckily EAL only needs this in multiprocess part, disabled on Windows; but PMDs do require it in portable code. Even Unices would benefit a little from not having #ifdef CLOCK_MONOTONIC_RAW in several files. I'm for moving this to EAL. P.S. Not all gettimeofday() are subject to replacement with new API: for example, in PCAP we (arguably) need a realtime stamp in packets.