<h3>Contribution description</h3>
<p>This PR provides a better resilience to the SAM0 ethernet driver in case of heavy traffic in the network.</p>
<p>In some case interrupts fire faster than the netdev thread can process them and we run out of buffers quickly. With this PR, we now check if we don't have buffers available, so we can flush everything and restart reception properly even if we did drop a few in the operation.</p>
<h3>Testing procedure</h3>
<p>See <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="876784740" data-permission-text="Title is private" data-url="https://github.com/RIOT-OS/RIOT/issues/16451" data-hovercard-type="issue" data-hovercard-url="/RIOT-OS/RIOT/issues/16451/hovercard" href="https://github.com/RIOT-OS/RIOT/issues/16451">#16451</a></p>
<h3>Issues/PRs references</h3>
<p><span class="issue-keyword tooltipped tooltipped-se" aria-label="This pull request closes issue #16451.">Fixes</span> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="876784740" data-permission-text="Title is private" data-url="https://github.com/RIOT-OS/RIOT/issues/16451" data-hovercard-type="issue" data-hovercard-url="/RIOT-OS/RIOT/issues/16451/hovercard" href="https://github.com/RIOT-OS/RIOT/issues/16451">#16451</a></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/16683'>https://github.com/RIOT-OS/RIOT/pull/16683</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>cpu/sam0: improve ethernet driver resilience</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/16683/files#diff-418f4f781f3a681ebfe1fd2fa409294ae1ab2bc198e7daf9df86896648590c7a">cpu/sam0_common/periph/eth.c</a>
    (35)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/16683/files#diff-fadc428ce84429f822268b9a07511959daccfcf865a46b1f0066d6614bc4b132">cpu/sam0_common/sam0_eth/eth-netdev.c</a>
    (22)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/RIOT-OS/RIOT/pull/16683.patch'>https://github.com/RIOT-OS/RIOT/pull/16683.patch</a></li>
  <li><a href='https://github.com/RIOT-OS/RIOT/pull/16683.diff'>https://github.com/RIOT-OS/RIOT/pull/16683.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/16683">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABE7WYGGCOIEICI3CFDIC6DTZW3ZFANCNFSM5BAYQKUQ">unsubscribe</a>.<img src="https://github.com/notifications/beacon/ABE7WYHDWWGZK455FP6XHATTZW3ZFA5CNFSM5BAYQKU2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4OGRE46Q.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/16683",
"url": "https://github.com/RIOT-OS/RIOT/pull/16683",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>