Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp2732782iog; Mon, 27 Jun 2022 01:31:33 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uRh8Uw6WjIVk/hstSnmivURnE30OO2S5bmMuA47PbDeDBbyAaL17+v4XoAu8T8d7pIhbYq X-Received: by 2002:a17:90b:164a:b0:1ec:b991:b69 with SMTP id il10-20020a17090b164a00b001ecb9910b69mr19579162pjb.173.1656318692933; Mon, 27 Jun 2022 01:31:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656318692; cv=none; d=google.com; s=arc-20160816; b=U+EXieDUZ2cDPv0i1tPgh3N9OYj03UiGDlqhV4fnzyA/BwlACagvYVGNiPvpyP1MeP 8aHiS43B9d1mOXsFtfXDS83gZL7q/Nx7Z9EoMV4MPH+9+px4Yk81xcrC6X8venP8YyCH Squ0JELhyvBEMqrqZ1z7UOIby3uXNyr7wo19ht6ryyVbjHtqZjRTe1URqkQ7xml9MRjC Hm9GwKErv0LiFnVkcn78aYnLfonkCYLB5WNavLdOD8eE0qKu5B0pQ+giKurwZaJY5DJL s7VsUesvGCzVV25LyQ7C2d172NVHDmyThS3i3+jk0Qr1K4tsBbPUjXC1y2IPo3l5iPuv +cxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=6pN2EOaoLQrM24mPPQ0jTn2uoQlwMcA+d91hvoU7yyI=; b=nWIWAqF3KmhhQJV9HVwNIWzq1abMUtZs+0MGrrmbcY4ZSDVU1k55xQXW+yaeSCfWrf NGvxmgGbHM47qhw+h9pjd/QXWwGiYwCtV593bPi/2UzH+Lo4mg9aBfV6G5+d9pMCtZVo bKfdGElTc3zIVyWLdzGYnRFHqnubr+0V4gO36gY0q7I/eCx8Xy/h82ljSWQ017pt/Ct6 ILI+PIN2vMAv5wBSHQ4jI/5a5r2LCMDZOCZgjo8vFvakMx/avmpNgB47VF5p8kccNMXO 3y/wFKl3cQ4sOXy6x1TlMLk2e/X27l6oQAPlgyCWmewrsGsiVnt2ASGkqTLw42tSKR5H LAAA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p4-20020a634204000000b0040db53b10e7si5015963pga.578.2022.06.27.01.31.21; Mon, 27 Jun 2022 01:31:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233146AbiF0HxQ (ORCPT + 99 others); Mon, 27 Jun 2022 03:53:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58206 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229827AbiF0HxO (ORCPT ); Mon, 27 Jun 2022 03:53:14 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id BFA565FC8; Mon, 27 Jun 2022 00:53:13 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 9CBB61758; Mon, 27 Jun 2022 00:53:13 -0700 (PDT) Received: from [192.168.4.21] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 791553F5A1; Mon, 27 Jun 2022 00:53:08 -0700 (PDT) Message-ID: <5db4e640-8165-d7bf-c6b6-192ea7edfafd@arm.com> Date: Mon, 27 Jun 2022 08:52:51 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [PATCH net-next 1/4] time64.h: define PSEC_PER_NSEC and use it in tc-taprio Content-Language: en-US To: Vladimir Oltean , netdev@vger.kernel.org Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Xiaoliang Yang , Claudiu Manoil , Alexandre Belloni , UNGLinuxDriver@microchip.com, Andrew Lunn , Vivien Didelot , Florian Fainelli , Michael Walle , Vinicius Costa Gomes , Maxim Kochetkov , Colin Foster , Richie Pearn , linux-kernel@vger.kernel.org, Andy Lutomirski , Thomas Gleixner References: <20220626120505.2369600-1-vladimir.oltean@nxp.com> <20220626120505.2369600-2-vladimir.oltean@nxp.com> From: Vincenzo Frascino In-Reply-To: <20220626120505.2369600-2-vladimir.oltean@nxp.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Vladimir, On 6/26/22 13:05, Vladimir Oltean wrote: > Time-sensitive networking code needs to work with PTP times expressed in > nanoseconds, and with packet transmission times expressed in > picoseconds, since those would be fractional at higher than gigabit > speed when expressed in nanoseconds. > > Convert the existing uses in tc-taprio to a PSEC_PER_NSEC macro. > > Cc: Andy Lutomirski > Cc: Thomas Gleixner > Cc: Vincenzo Frascino > Signed-off-by: Vladimir Oltean > --- > include/vdso/time64.h | 1 + > net/sched/sch_taprio.c | 4 ++-- > 2 files changed, 3 insertions(+), 2 deletions(-) > > diff --git a/include/vdso/time64.h b/include/vdso/time64.h > index b40cfa2aa33c..f1c2d02474ae 100644 > --- a/include/vdso/time64.h > +++ b/include/vdso/time64.h > @@ -6,6 +6,7 @@ > #define MSEC_PER_SEC 1000L > #define USEC_PER_MSEC 1000L > #define NSEC_PER_USEC 1000L > +#define PSEC_PER_NSEC 1000L Are you planning to use this definition in the vdso library code? If not, you should define PSEC_PER_NSEC in "include/linux/time64.h". The vdso namespace should contain only the definitions shared by the implementations of the kernel and of the vdso library. ... -- Regards, Vincenzo