Thread (44 messages) flat view 44 messages, 9 authors, 2020-09-01

Re: [PATCH v3 5/8] net: dsa: hellcreek: Add TAPRIO offloading support

From: Vinicius Costa Gomes <vinicius.gomes@intel.com>
Date: 2020-08-25 17:50:53
Also in: linux-devicetree

Hi Kurt,

Kurt Kanzenbach [off-list ref] writes:
On Mon Aug 24 2020, Vinicius Costa Gomes wrote:
quoted
Hi,

Kurt Kanzenbach [off-list ref] writes:
[snip]
quoted
quoted
+	/* 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help