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 35AF5A00BE; Mon, 16 May 2022 15:26:12 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2866042685; Mon, 16 May 2022 15:26:12 +0200 (CEST) Received: from mail-pf1-f182.google.com (mail-pf1-f182.google.com [209.85.210.182]) by mails.dpdk.org (Postfix) with ESMTP id B59B740A7A for ; Mon, 16 May 2022 15:26:10 +0200 (CEST) Received: by mail-pf1-f182.google.com with SMTP id a11so14042629pff.1 for ; Mon, 16 May 2022 06:26:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=NCjKCPja2OhYnFBdtWJumIULYS4ejdl+DWy/Ce4mVnw=; b=vLDZrz+oDXdGMsAcqghjGfWzIE+7/tJTZy6ILjJutVe3Iyc8+KPeHoxiS9IxVHPWwa /BApSxEkSRD2tUHqPvxOPFeImU0EYbcsDwlONIBIeW/djpuvMdAewHSpc5kVdgRN1elz QHxs0bYJIRIzdS14rvMkAIe4mbY6ACHjyRiQT+HPSlVsbeNxEEwKolTskj8KwNd/belH MSAfWW+DZNn5Wxu20efZlUjGmO9MMelyBdf+5HfQc+zs1umQttp+1VznXabqXnZe6mh1 lMyw8MNCdV3tlrHzP3tQRIelbgTv8i0K9+jBmQW7MVVGJ3VuyWV8fxDFnuD+cxCoXjVj IOVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=NCjKCPja2OhYnFBdtWJumIULYS4ejdl+DWy/Ce4mVnw=; b=YmY8pJHT4NA4CPISCZm6eOzw8WEX+k2RPYoiDZTsUIR1I625aFwOQ2n8klEaK1scQW tRZBApRvnWWAp3Z98GUx0NXIec6K/KjOG7yr2r4hkJ/7la2K5V55jo456AxlylL4/stq OoMx9coYqlAU248dF0aGazQSVqCyeLaMsMQk+xDRuqDsRoqv9Qv+XEgSQKZGW9U1VjXW LVRcVthwX/fRcEejgiExEDpXv8Xuct/Qz0pPo66vBr8dhKXJnPfqpuMsSgHjERupY8G9 tV9QgNgb9+DLRgViJm2uFl8mMt7mN5FBNnEUEzzEtnuaWXT6Qlb5Ajn+ela/WK4aDgaC 2A1w== X-Gm-Message-State: AOAM531gG6U1utZfESexBsb4NHoCozasR9/qk4i6W5PNik0vmN9kOOSz 851BgT7qA5Vcu4bKfQs4W5IHTfuRSB3fWQ== X-Google-Smtp-Source: ABdhPJw4lC02VKEC0Ni1HkZO4JXcOA2cOCJRskf9p3RGda+mVRQ3XIF8s9XtuT6t8H8R0RKXvQyn4Q== X-Received: by 2002:a63:4b16:0:b0:3db:2389:8403 with SMTP id y22-20020a634b16000000b003db23898403mr15429798pga.594.1652707569850; Mon, 16 May 2022 06:26:09 -0700 (PDT) Received: from hermes.local (204-195-112-199.wavecable.com. [204.195.112.199]) by smtp.gmail.com with ESMTPSA id n26-20020a056a00213a00b0050dc7628167sm6801966pfj.65.2022.05.16.06.26.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 May 2022 06:26:09 -0700 (PDT) Date: Mon, 16 May 2022 06:26:06 -0700 From: Stephen Hemminger To: Quentin Armitage Cc: Reshma Pattan , Ray Kinsella , dev@dpdk.org, stable@dpdk.org Subject: Re: [PATCH] libpcapng: fix timestamp wrapping in output files Message-ID: <20220516062606.3d4313b8@hermes.local> In-Reply-To: <45bdbfad3857848faa2edc185db1ac639a901b23.camel@armitage.org.uk> References: <20220507161237.207805-1-quentin@armitage.org.uk> <20220511094655.4f885c84@hermes.local> <45bdbfad3857848faa2edc185db1ac639a901b23.camel@armitage.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 On Sat, 14 May 2022 18:14:48 +0100 Quentin Armitage wrote: > The final statement of pcapng_tsc_to_ns() should be: > return pcapng_time.ns + elapsed * TICK_SCALE; > > There is also a problem that rte_get_tsc_hz() returns eal_tsc_resolution_hz, but > this is not initialized until rte_eal_init() is called, so rte_get_tsc_hz() > cannot be called from a constructor function. Better to do initialization on first use then. It would be safer than the contstructor.