[PATCH 2/3] Pass TX sending hardware timestamp to a socket's buffer.

2020-12-09 Thread Erez Geva
p back to the application. The timestamp is used by the TC ETF before the buffer arrives in the network interface driver. Signed-off-by: Erez Geva --- include/net/inet_sock.h | 1 + net/ipv4/ip_output.c| 2 ++ net/ipv4/raw.c | 1 + net/ipv6/ip6_output.c | 2 ++ net/ipv

[PATCH 0/3] Add sending TX hardware timestamp for TC ETF Qdisc

2020-12-09 Thread Erez Geva
4: The socket buffer hardware timestamp is used by the network interface driver to send the actual sending timestamp back to the application. The timestamp is used by the TC ETF before the socket buffer arrives in the network interface driver. Erez Geva (3): Add TX sending

[PATCH 3/3] The TC ETF Qdisc pass the hardware timestamp to the interface driver.

2020-12-09 Thread Erez Geva
igned-off-by: Erez Geva --- include/uapi/linux/pkt_sched.h | 1 + net/sched/sch_etf.c| 59 +++--- 2 files changed, 49 insertions(+), 11 deletions(-) diff --git a/include/uapi/linux/pkt_sched.h b/include/uapi/linux/pkt_sched.h index 9e7c2c607845..51e2b57

[PATCH 1/3] Add TX sending hardware timestamp.

2020-12-09 Thread Erez Geva
timestamp. - Add the hardware timestamp to the socket cookie. - Copy the TX sending hardware timestamp to the socket cookie. Signed-off-by: Erez Geva --- include/net/sock.h| 2 ++ include/uapi/asm-generic/socket.h | 3 +++ include/uapi/linux/net_tstamp.h | 3 ++- net/core/sock.c

[PATCH 7/7] TC-ETF support PTP clocks

2020-10-01 Thread Erez Geva
- Add support for using a POSIX dynamic clock with Traffic control Earliest TxTime First (ETF) Qdisc. Signed-off-by: Erez Geva --- include/uapi/linux/net_tstamp.h | 5 ++ net/sched/sch_etf.c | 100 +--- 2 files changed, 97 insertions(+), 8

[PATCH 6/7] TC-ETF code improvements

2020-10-01 Thread Erez Geva
- Change clockid to use clockid_t type. - Pass pointer to ETF private structure to local function instead of retrieving it from Qdisc object again. - fix comment. Signed-off-by: Erez Geva --- net/sched/sch_etf.c | 38 +- 1 file changed, 17

[PATCH 3/7] Functions to fetch POSIX dynamic clock object

2020-10-01 Thread Erez Geva
Add kernel functions to fetch a pointer to a POSIX dynamic clock using a user file description dynamic clock ID. Signed-off-by: Erez Geva --- include/linux/posix-clock.h | 39 +++ kernel/time/posix-clock.c | 76 + 2 files changed, 115

[PATCH 5/7] Traffic control using high-resolution timer issue

2020-10-01 Thread Erez Geva
- Add new schedule function for Qdisc watchdog. The function avoids reprogram if watchdog already expire before new expire. - Use new schedule function in ETF. - Add ETF range value to kernel configuration. as the value is characteristic to Hardware. Signed-off-by: Erez Geva

[PATCH 1/7] POSIX clock ID check function

2020-10-01 Thread Erez Geva
Add function to check whether a clock ID refer to a file descriptor of a POSIX dynamic clock. Signed-off-by: Erez Geva --- include/linux/posix-timers.h | 5 + kernel/time/posix-timers.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/include/linux/posix-timers.h b

[PATCH 0/7] TC-ETF support PTP clocks series

2020-10-01 Thread Erez Geva
f Hardware, that seems to be the proper way. 7. Add support for using PHC clock with TC-ETF. Erez Geva (7): POSIX clock ID check function Function to retrieve main clock state Functions to fetch POSIX dynamic clock object Fix qdisc_watchdog_schedule_range_ns range check Traffic control

[PATCH 2/7] Function to retrieve main clock state

2020-10-01 Thread Erez Geva
Add kernel function to retrieve main clock oscillator state. As calibration is done from user space daemon, the kernel access function permit read only. Signed-off-by: Erez Geva --- include/linux/timex.h | 1 + kernel/time/timekeeping.c | 9 + 2 files changed, 10 insertions(+) diff

[PATCH 4/7] Fix qdisc_watchdog_schedule_range_ns range check

2020-10-01 Thread Erez Geva
- As all parameters are unsigned. - If 'expires' is bigger than 'last_expires' then the left expression overflows. - It is better to use addition and check both ends of the range. Signed-off-by: Erez Geva --- net/sched/sch_api.c | 3 ++- 1 file changed