On Fri, 29 Aug 2025 12:51:40 +0200 Gatien CHEVALLIER wrote:
On 8/28/25 04:31, Jakub Kicinski wrote:
quoted
On Wed, 27 Aug 2025 13:04:58 +0200 Gatien Chevallier wrote:
quoted
+ curr_time = ns_to_timespec64(ns);
+ if (target_ns < ns + PTP_SAFE_TIME_OFFSET_NS) {
+ cfg->start = timespec64_add_safe(cfg->start, curr_time);
Is there a strong reason to use timespec64_add_safe()?
It's not exported to modules:
ERROR: modpost: "timespec64_add_safe" [drivers/net/ethernet/stmicro/stmmac/stmmac.ko] undefined!
Hello Jakub,
you're absolutely right. I don't know how I did not encounter the build
error while performing some tests, that I'm getting now as well.
The handling of overflows is already done in that function. Either
I can make a patch to export the symbol or handle the computation in the
driver. What do you think is best?
The odds of me being right about time related code are only slightly
better than 50/50, and I don't know what "flexible PPS" is :)
But in principle, if the reason you need to check for overflow is valid
-- add the export. The time maintainers will tell us if they don't
want it.