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 7FEE1A0093; Tue, 17 May 2022 17:15:27 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 257CB40041; Tue, 17 May 2022 17:15:27 +0200 (CEST) Received: from mail-pg1-f179.google.com (mail-pg1-f179.google.com [209.85.215.179]) by mails.dpdk.org (Postfix) with ESMTP id CC7B14003C for ; Tue, 17 May 2022 17:15:25 +0200 (CEST) Received: by mail-pg1-f179.google.com with SMTP id 31so17195523pgp.8 for ; Tue, 17 May 2022 08:15:25 -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=ojI0TvndFfqNjfre4AAHyKYtyAX9NHHErQ3+rQMwsQo=; b=NTAMamCuKyZt5vNaf7FCTBrfKaexulCR/37VQSj8QkRdPQlI/dNw9iOKF13n8KQQsl 83NQ8aJEJPVHQF7ibEHAP+yD6F6JMlLCgGT+EdfApryUiP/UtoBn8GMojdN5cQgK10L0 aCmcDKQx/p83AttCP9jG0fWFlDx3dBQH81I3Bl+oO2B178TbCQqLLSvXXmqyrQ9P9ma4 sRPaQ5uSk3/SSSNpQ/iglLZrsiInkFN6pWsXLv/JApiL8ReEZc7QOf8mWeyCXDOnZ4pE xSJelaG02OQ4OTK3pQaKGs/JyJayDPtFwIBIm/scyihQhJHFskn234LKbNZqIgKK/lmr NWwA== 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=ojI0TvndFfqNjfre4AAHyKYtyAX9NHHErQ3+rQMwsQo=; b=Ga5PfwgoK/wDyLuS5wAihDtoFi4b3bNQ9k6uWRbjz8Y7w3ALNQXWDGkow6qN+9IhKT BVSG8imfZID1OtXJ7Y1hZAg7lF8z54czmImpl4DEInKywmdvl08FHu1CaOtuYmZhzpA8 2ZjI0TesDWinua5IcZjK28wnPFl8y62LQK20ssHI2mD7xvLtNJEH5To0rm0Bqueg3qDv HUyAieOh0zOd8N+ZsB9lRh+Bjv5P/TziVY6GAt7nNFf7T9aANPzBvwzQ9MajtgTD9buR hILBvG/z4yalUd8I6oxriZFhe0lkpKCIop+AsyFawgvKlImDOyowwtI5BJHxj1Lbs1EC CE1Q== X-Gm-Message-State: AOAM530AOfWJguH9BnbkbZhkKz6WIi0yUNeCS/p1PPCNtH3VY7nIaxXt LitUvCaBJ7esyn4F6wVbkcxm0Q== X-Google-Smtp-Source: ABdhPJzeuh9nB3O28X3D6QJVsZsRsezkNv2XljHttvU2MfbaiepEPJZERiN0OSld/HhV5pLLcmpUpg== X-Received: by 2002:a63:194b:0:b0:3ab:71e5:161 with SMTP id 11-20020a63194b000000b003ab71e50161mr19541148pgz.115.1652800524877; Tue, 17 May 2022 08:15:24 -0700 (PDT) Received: from hermes.local (204-195-112-199.wavecable.com. [204.195.112.199]) by smtp.gmail.com with ESMTPSA id l13-20020a63f30d000000b003f285ba5a9fsm2554808pgh.57.2022.05.17.08.15.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 May 2022 08:15:24 -0700 (PDT) Date: Tue, 17 May 2022 08:15:21 -0700 From: Stephen Hemminger To: Quentin Armitage Cc: Reshma Pattan , Ray Kinsella , dev@dpdk.org, stable@dpdk.org Subject: Re: [PATCH v2] libpcapng: fix timestamp wrapping in output files Message-ID: <20220517081521.636cb5a0@hermes.local> In-Reply-To: <20220517100115.157888-1-quentin@armitage.org.uk> References: <20220511094655.4f885c84@hermes.local> <20220517100115.157888-1-quentin@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 Tue, 17 May 2022 11:01:15 +0100 Quentin Armitage wrote: > In pcap_tsc_to_ns(), delta * NSEC_PER_SEC will overflow approx 8 > seconds after pcap_init is called when using a TSC with a frequency > of 2.5GHz. > > To avoid the overflow, update the saved time and TSC value once > delta >= tsc_hz. > > Fixes: 8d23ce8f5ee ("pcapng: add new library for writing pcapng files") > Cc: stable@dpdk.org > > Signed-off-by: Quentin Armitage Thanks for fixing this. Acked-by: Stephen Hemminger