lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87d03ety11.fsf@intel.com>
Date:   Tue, 25 Aug 2020 10:50:50 -0700
From:   Vinicius Costa Gomes <vinicius.gomes@...el.com>
To:     Kurt Kanzenbach <kurt@...utronix.de>, Andrew Lunn <andrew@...n.ch>,
        Vivien Didelot <vivien.didelot@...il.com>,
        Florian Fainelli <f.fainelli@...il.com>
Cc:     "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>, netdev@...r.kernel.org,
        Rob Herring <robh+dt@...nel.org>, devicetree@...r.kernel.org,
        Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
        Richard Cochran <richardcochran@...il.com>,
        Kamil Alkhouri <kamil.alkhouri@...offenburg.de>,
        ilias.apalodimas@...aro.org, Vladimir Oltean <olteanv@...il.com>
Subject: Re: [PATCH v3 5/8] net: dsa: hellcreek: Add TAPRIO offloading support

Hi Kurt,

Kurt Kanzenbach <kurt@...utronix.de> writes:

> On Mon Aug 24 2020, Vinicius Costa Gomes wrote:
>> Hi,
>>
>> Kurt Kanzenbach <kurt@...utronix.de> writes:
>>
> [snip]
>>> +	/* Setup timer for schedule switch: The IP core only allows to set a
>>> +	 * cycle start timer 8 seconds in the future. This is why we setup the
>>> +	 * hritmer to base_time - 5 seconds. Then, we have enough time to
>>> +	 * activate IP core's EST timer.
>>> +	 */
>>> +	start = ktime_sub_ns(schedule->base_time, (u64)5 * NSEC_PER_SEC);
>>> +	hrtimer_start_range_ns(&hellcreek_port->cycle_start_timer, start,
>>> +			       NSEC_PER_SEC, HRTIMER_MODE_ABS);
>>
>> If we are talking about seconds here, I don't think you need to use a
>> hrtimer, you could use a workqueue/delayed_work. Should make things a
>> bit simpler.
>
> I've used hrtimers for one reason: The hrtimer provides a way to fire at
> an absolute base time based on CLOCK_TAI. All the other facilities such
> as workqueues, timer list timers, etc do not.

Oh, yeah. Good point.


Cheers,
-- 
Vinicius

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ