<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p
{mso-style-priority:99;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
pre
{mso-style-priority:99;
mso-style-link:"HTML Vorformatiert Zchn";
margin:0cm;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New","serif";}
span.HTMLVorformatiertZchn
{mso-style-name:"HTML Vorformatiert Zchn";
mso-style-priority:99;
mso-style-link:"HTML Vorformatiert";
font-family:Consolas;}
span.E-MailFormatvorlage20
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="DE" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Thank you. That makes sense.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">I will prepare a new version.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt">
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">Von:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Sebastian Huber [mailto:sebastian.huber@embedded-brains.de]
<br>
<b>Gesendet:</b> Freitag, 20. März 2020 12:54<br>
<b>An:</b> Sommer, Jan; devel@rtems.org<br>
<b>Betreff:</b> Re: AW: [PATCH v2 3/3] i386: Port to RTEMS<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p>On 10/03/2020 09:12, <a href="mailto:Jan.Sommer@dlr.de">Jan.Sommer@dlr.de</a> wrote:<o:p></o:p></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<pre>[...]<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<pre><span style="color:black">diff --git a/freebsd/sys/net/iflib.c b/freebsd/sys/net/iflib.c<o:p></o:p></span></pre>
<pre><span style="color:black">index 89bc5e79..09282ac7 100644<o:p></o:p></span></pre>
<pre><span style="color:black">--- a/freebsd/sys/net/iflib.c<o:p></o:p></span></pre>
<pre><span style="color:black">+++ b/freebsd/sys/net/iflib.c<o:p></o:p></span></pre>
<pre><span style="color:black">@@ -1031,8 +1031,13 @@ iflib_netmap_txsync(struct netmap_kring *kring, int<o:p></o:p></span></pre>
<pre><span style="color:black">flags)<o:p></o:p></span></pre>
<pre><span style="color:black"> }<o:p></o:p></span></pre>
<pre><span style="color:black"> if (!(ctx->ifc_flags & IFC_NETMAP_TX_IRQ))<o:p></o:p></span></pre>
<pre><span style="color:black"> if (kring->nr_hwtail != nm_prev(kring->nr_hwcur, lim)) {<o:p></o:p></span></pre>
<pre><span style="color:black">+#ifndef __rtems__<o:p></o:p></span></pre>
<pre><span style="color:black"> callout_reset_on(&txq->ift_timer, hz < 2000 ? 1 : hz /<o:p></o:p></span></pre>
<pre><span style="color:black">1000,<o:p></o:p></span></pre>
<pre><span style="color:black"> iflib_timer, txq, txq->ift_timer.c_cpu);<o:p></o:p></span></pre>
<pre><span style="color:black">+#else /* __rtems__ */<o:p></o:p></span></pre>
<pre><span style="color:black">+ callout_reset_curcpu(&txq->ift_timer, hz < 2000 ? 1 : hz<o:p></o:p></span></pre>
<pre><span style="color:black">/ 1000,<o:p></o:p></span></pre>
<pre><span style="color:black">+ iflib_timer, txq);<o:p></o:p></span></pre>
</blockquote>
<pre>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.<o:p></o:p></pre>
<pre>If someone has a better idea, please tell me.<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
</blockquote>
<p>I would change the callout_reset_on() macro and don't change the caller.<o:p></o:p></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__ */<o:p></o:p></p>
</div>
</div>
</body>
</html>