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 0B1F0A00BE for ; 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 D016740A7A; Mon, 16 May 2022 15:26:11 +0200 (CEST) Received: from mail-pf1-f178.google.com (mail-pf1-f178.google.com [209.85.210.178]) by mails.dpdk.org (Postfix) with ESMTP id B69A640A7D for ; Mon, 16 May 2022 15:26:10 +0200 (CEST) Received: by mail-pf1-f178.google.com with SMTP id 204so14034972pfx.3 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=a/InNyA6SLZYI5sx2ZhxZx+IMoF5UuBFAAeQQUAY9UjsrFNyE4s5hH36nHpx+07dxa 0RWV08HJNhb0A9kWsqT1GKffPksu8FjKLg5kk5Zx7eo0raEYqy4tYuLLuGDrBmtBPSJ1 BcM+Al12CjTLloBA7X+tFj2kYrBWoR++xNnc0ONhkqQ1e5YXCq8iZa25fR+255qjjcP6 INGhR25yZCCvk2hWITY6Uf57gX6Zln9OiVsjMSCQa8Rjr4vdikhTdhESj4UOlzZeo4N7 0gqgRfjtaDpun+appOGyWlaCgUuYRX06GEbjH2Tk2hRez27mEHN+J0lo8V2mIlHdepxH lY3g== X-Gm-Message-State: AOAM533kD0an0hlpP+6plWD55Ld3Txx4rmZ52jZyhGYXRoywZWxL8GOy 0gqCZztqW9wVmGrNQRw21aGrmw== 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: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-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.