On 10/03/2020 09:12, jan.som...@dlr.de wrote:

[...]

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);
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.

I would change the callout_reset_on() macro and don't change the caller.

#ifndef __rtems__
#define    callout_reset_on(c, to_ticks, fn, arg, cpu) \
    callout_reset_sbt_on((c), tick_sbt * (to_ticks), 0, (fn), (arg),    \
        (cpu), C_HARDCLOCK)
#else /* __rtems__ */
#define    callout_reset_on(c, to_ticks, fn, arg, cpu) \
    callout_reset_sbt_on((c), tick_sbt * (to_ticks), 0, (fn), (arg),    \
        -1, C_HARDCLOCK)
#endif /* __rtems__ */

_______________________________________________
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Reply via email to