<h3>Contribution description</h3>
<p>This PR removes the NETDEV_MSG_TYPE_EVENT and forces GNRC Netif to do the Bottom Half processing (ISR offload) using event loops instead of msg queues.</p>
<p>Msg queues are not safe for processing ISR because they might be lost. Indeed this might happen often if the device is under stress (e.g Border Router). Losing these events tend to have catastrophic consequences such as:</p>
<ul>
<li>Radios might stop receiving frames if the FB is lock and nobody cares to read the framebuffer</li>
<li>The IEEE 802.15.4 SubMAC might be go to the wrong state if one of the radio events get lost.</li>
</ul>
<p>I suspect some of the BR freezes might be related to this.</p>
<p>This PR also removes the <code>gnrc_netif_events</code> since it's not optional anymore. We should adapt it in the future to use <code>thread_flags</code> directly though (I know <a class="user-mention" data-hovercard-type="user" data-hovercard-url="/users/maribu/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/maribu">@maribu</a> already did this in one of the <code>confirm_send</code> PRs).</p>

<h3>Testing procedure</h3>
<p>Make sure GNRC netif works properly.</p>

<h3>Issues/PRs references</h3>
<p>Depends on <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="971752693" data-permission-text="Title is private" data-url="https://github.com/RIOT-OS/RIOT/issues/16747" data-hovercard-type="pull_request" data-hovercard-url="/RIOT-OS/RIOT/pull/16747/hovercard" href="https://github.com/RIOT-OS/RIOT/pull/16747">#16747</a>, otherwise that radio won't work anymore.</p>


<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>  <a href='https://github.com/RIOT-OS/RIOT/pull/16748'>https://github.com/RIOT-OS/RIOT/pull/16748</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>drivers/at86rf215: remove msg queue dependency</li>
  <li>gnrc_netif: use events instead of msg queue for ISR offload</li>
  <li>gnrc_netif: use event queue for ISR offload</li>
  <li>link_layer/gomach: use event queue for ISR offload</li>
  <li>link_layer/lwmac: use event queue for ISR offload</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/16748/files#diff-b35ef68217e08c051831a5f1a4ab50f33adb253c9ec58d48d1f61382b8b886c8">drivers/at86rf215/at86rf215_netdev.c</a>
    (14)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/16748/files#diff-19ad70d25ba03483c84513c19a33cedf4f1dd2c8c9d878766c1ac817447275f6">drivers/include/at86rf215.h</a>
    (1)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/16748/files#diff-d2e4f5b2cddc5eddb20e42bf88b7b16085ba4599fab8081e6f6168f60e12fedb">makefiles/pseudomodules.inc.mk</a>
    (1)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/16748/files#diff-3166d0c85b3c32e3b3349286328fc8450229a87f10602d6d0ed2079a51fb6965">sys/include/net/gnrc/netif.h</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/16748/files#diff-f181668b2da61d8b2a9a14a5c9a67ab52afd907438ebff66a9b88bdd55cbe997">sys/include/net/gnrc/netif/internal.h</a>
    (5)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/16748/files#diff-6e381f8f6f5081ba31d65f4cd98d2d96bc6f35e97fb33513fe8453ca71cd9834">sys/net/gnrc/Makefile.dep</a>
    (7)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/16748/files#diff-090a76a430dc1f52a7f2358195599a43ada390f84c2507961c32f97135a4bbfd">sys/net/gnrc/link_layer/gomach/gomach.c</a>
    (10)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/16748/files#diff-7b68c4395b14dd941c4478ee3585e2ebf6d372082a7f55be99144c741a64934e">sys/net/gnrc/link_layer/lwmac/lwmac.c</a>
    (10)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/16748/files#diff-2ad823469e86d3772efecaa0f4bb5afcc1d6d039af9cc28db3535fcd292e28a6">sys/net/gnrc/netif/gnrc_netif.c</a>
    (98)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/16748/files#diff-78ee567a3ff73b1cc35dc49b94d0887bcecba500cbc23f72496147840e81596e">sys/net/gnrc/netif/lorawan/gnrc_netif_lorawan.c</a>
    (7)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/RIOT-OS/RIOT/pull/16748.patch'>https://github.com/RIOT-OS/RIOT/pull/16748.patch</a></li>
  <li><a href='https://github.com/RIOT-OS/RIOT/pull/16748.diff'>https://github.com/RIOT-OS/RIOT/pull/16748.diff</a></li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/RIOT-OS/RIOT/pull/16748">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABE7WYC2WY6CQPSIYRWLQODT5EJOTANCNFSM5CHYXUIA">unsubscribe</a>.<br />Triage notifications on the go with GitHub Mobile for <a href="https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675">iOS</a> or <a href="https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email">Android</a>.<img src="https://github.com/notifications/beacon/ABE7WYDA44GOJQRZJMZOFDTT5EJOTA5CNFSM5CHYXUIKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4OPL3WQA.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/RIOT-OS/RIOT/pull/16748",
"url": "https://github.com/RIOT-OS/RIOT/pull/16748",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>