Hi Vladimir,
On 6/26/22 13:05, Vladimir Oltean wrote:
quoted hunk ↗ jump to hunk
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 <redacted>
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.
...
--
Regards,
Vincenzo