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 0B838A0524; Thu, 29 Apr 2021 21:52:25 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 73C29410DD; Thu, 29 Apr 2021 21:52:25 +0200 (CEST) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id D90CF410D7 for ; Thu, 29 Apr 2021 21:52:23 +0200 (CEST) Received: by linux.microsoft.com (Postfix, from userid 1061) id DB75D20B8000; Thu, 29 Apr 2021 12:52:22 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com DB75D20B8000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1619725942; bh=k6ADoDSd9Uq1dxU7grbhXNXTzA0i1ppL/DFsY9siNFI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=lqPcI9YH4+0ANJb+l7RYKtdNGbpl/6CPgKZ2vA+Cv5DDVW89pKDDqgDdSynVgipxa NP0zaZ7BsJBvczZ7Nk+VrtiLwuKD7h5wUjY9BEpIS/WUc2t8zddjsRyOCnqTygKdKD Vr0u3LWkd5RChpq8WkSYWURKFJCmlCzQWcn2Uqh0= Date: Thu, 29 Apr 2021 12:52:22 -0700 From: Jie Zhou To: Dmitry Kozlyuk Cc: Thomas Monjalon , Tyler Retzlaff , 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: <20210429195222.GA27460@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> References: <1618594501-23795-10-git-send-email-jizh@linux.microsoft.com> <3990047.YzQW8q25Qq@thomas> <1624822.LYVHZhtJzb@thomas> <20210428114540.5d4bc1c5@sovereign> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210428114540.5d4bc1c5@sovereign> User-Agent: Mutt/1.5.21 (2010-09-15) 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" On Wed, Apr 28, 2021 at 11:45:40AM +0300, Dmitry Kozlyuk wrote: > 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. I will move this into EAL in V9. Thanks.