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 10:06:15 +0000 [thread overview]
Message-ID: <20220627100614.s2arerirkmcnd37z@skbuf> (raw)
In-Reply-To: <4e4b9e1a-778e-9ca1-5c15-65e45a532790@arm.com>
On Mon, Jun 27, 2022 at 10:25:42AM +0100, Vincenzo Frascino wrote:
> Hi Vladimir,
>
> On 6/27/22 09:51, Vladimir Oltean wrote:
> > 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?
>
> I do not have a strong opinion on where to put it. But I think that if you put a
> section above TIME64_MAX should work.
@networking people: do you mind if in v2 I move this patch to the end,
hardcode 1000 in the current DSA patch 4/4, and then replace it afterwards
with PSEC_PER_NSEC, together with tc-taprio? I'd like to leave the code
in a clean state, but remember this is also a patch that fixes a
functional issue, even if on net-next, so one dependency less can't
hurt, for those who'll want to backport.
next prev parent reply other threads:[~2022-06-27 10:06 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
2022-06-27 9:25 ` Vincenzo Frascino
2022-06-27 10:06 ` Vladimir Oltean [this message]
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=20220627100614.s2arerirkmcnd37z@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