<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>On 10/03/2020 09:12, <a class="moz-txt-link-abbreviated" href="mailto:Jan.Sommer@dlr.de">Jan.Sommer@dlr.de</a> wrote:<br>
</p>
<blockquote type="cite"
cite="mid:67a8a6f4f9114cf2af7afb1136eea713@dlr.de">
<pre class="moz-quote-pre" wrap="">[...]
</pre>
<blockquote type="cite" style="color: #000000;">
<pre class="moz-quote-pre" wrap="">diff --git a/freebsd/sys/net/iflib.c b/freebsd/sys/net/iflib.c
index 89bc5e79..09282ac7 100644
--- a/freebsd/sys/net/iflib.c
+++ b/freebsd/sys/net/iflib.c
@@ -1031,8 +1031,13 @@ iflib_netmap_txsync(struct netmap_kring *kring, int
flags)
}
if (!(ctx->ifc_flags & IFC_NETMAP_TX_IRQ))
if (kring->nr_hwtail != nm_prev(kring->nr_hwcur, lim)) {
+#ifndef __rtems__
callout_reset_on(&txq->ift_timer, hz < 2000 ? 1 : hz /
1000,
iflib_timer, txq, txq->ift_timer.c_cpu);
+#else /* __rtems__ */
+ callout_reset_curcpu(&txq->ift_timer, hz < 2000 ? 1 : hz
/ 1000,
+ iflib_timer, txq);
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">I am not completely sure about all the side effects of replacing callout_reset_on with callout_reset_curcpu, but the struct callout has no "c_cpu" member in RTEMS.
If someone has a better idea, please tell me.
</pre>
</blockquote>
<p>I would change the callout_reset_on() macro and don't change the
caller.</p>
<p>#ifndef __rtems__<br>
#define callout_reset_on(c, to_ticks, fn, arg, cpu)
\<br>
callout_reset_sbt_on((c), tick_sbt * (to_ticks), 0, (fn),
(arg), \<br>
(cpu), C_HARDCLOCK)<br>
#else /* __rtems__ */<br>
#define callout_reset_on(c, to_ticks, fn, arg, cpu)
\<br>
callout_reset_sbt_on((c), tick_sbt * (to_ticks), 0, (fn),
(arg), \<br>
-1, C_HARDCLOCK)<br>
#endif /* __rtems__ */<br>
</p>
</body>
</html>