public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Vladimir Oltean <vladimir.oltean@nxp.com>
To: Vincenzo Frascino <vincenzo.frascino@arm.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Xiaoliang Yang <xiaoliang.yang_1@nxp.com>,
	Claudiu Manoil <claudiu.manoil@nxp.com>,
	Alexandre Belloni <alexandre.belloni@bootlin.com>,
	"UNGLinuxDriver@microchip.com" <UNGLinuxDriver@microchip.com>,
	Andrew Lunn <andrew@lunn.ch>,
	Vivien Didelot <vivien.didelot@gmail.com>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Michael Walle <michael@walle.cc>,
	Vinicius Costa Gomes <vinicius.gomes@intel.com>,
	Maxim Kochetkov <fido_max@inbox.ru>,
	Colin Foster <colin.foster@in-advantage.com>,
	Richie Pearn <richard.pearn@nxp.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Andy Lutomirski <luto@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH net-next 1/4] time64.h: define PSEC_PER_NSEC and use it in tc-taprio
Date: Mon, 27 Jun 2022 08:51:02 +0000	[thread overview]
Message-ID: <20220627085101.jw55y3fakqcw7zgi@skbuf> (raw)
In-Reply-To: <5db4e640-8165-d7bf-c6b6-192ea7edfafd@arm.com>

Hi Vincenzo,

On Mon, Jun 27, 2022 at 08:52:51AM +0100, Vincenzo Frascino wrote:
> 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 <luto@kernel.org>
> > Cc: Thomas Gleixner <tglx@linutronix.de>
> > Cc: Vincenzo Frascino <vincenzo.frascino@arm.com>
> > Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
> > ---
> >  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.

I am not. I thought it would be ok to preserve the locality of
definitions by placing this near the others of its kind, since a macro
doesn't affect the compiled vDSO code in any way. But if you prefer, I
can create a new mini-section in linux/time64.h. Any preference on where
exactly to place that definition within the file?

  reply	other threads:[~2022-06-27  8:51 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-26 12:05 [PATCH net-next 0/4] Prevent permanently closed tc-taprio gates from blocking a Felix DSA switch port Vladimir Oltean
2022-06-26 12:05 ` [PATCH net-next 1/4] time64.h: define PSEC_PER_NSEC and use it in tc-taprio Vladimir Oltean
2022-06-27  7:52   ` Vincenzo Frascino
2022-06-27  8:51     ` Vladimir Oltean [this message]
2022-06-27  9:25       ` Vincenzo Frascino
2022-06-27 10:06         ` Vladimir Oltean
2022-06-27 18:40           ` Jakub Kicinski
2022-06-26 12:05 ` [PATCH net-next 2/4] net: dsa: felix: keep reference on entire tc-taprio config Vladimir Oltean
2022-06-26 12:05 ` [PATCH net-next 3/4] net: dsa: felix: keep QSYS_TAG_CONFIG_INIT_GATE_STATE(0xFF) out of rmw Vladimir Oltean
2022-06-26 12:05 ` [PATCH net-next 4/4] net: dsa: felix: drop oversized frames with tc-taprio instead of hanging the port Vladimir Oltean
2022-06-27 18:46   ` Jakub Kicinski
2022-06-27 19:40     ` Vladimir Oltean
2022-06-27 19:46       ` Vladimir Oltean

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220627085101.jw55y3fakqcw7zgi@skbuf \
    --to=vladimir.oltean@nxp.com \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=andrew@lunn.ch \
    --cc=claudiu.manoil@nxp.com \
    --cc=colin.foster@in-advantage.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=f.fainelli@gmail.com \
    --cc=fido_max@inbox.ru \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=michael@walle.cc \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=richard.pearn@nxp.com \
    --cc=tglx@linutronix.de \
    --cc=vincenzo.frascino@arm.com \
    --cc=vinicius.gomes@intel.com \
    --cc=vivien.didelot@gmail.com \
    --cc=xiaoliang.yang_1@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox