File:  [NetBSD Developer Wiki] / wikisrc / users / msaitoh / Comparison_of_implementations_of_Ethernet_drivers.mdwn
Revision 1.10: download - view: text, annotated - select for diffs
Thu Jan 18 23:11:56 2018 UTC (3 years ago) by knakahara
Branches: MAIN
CVS tags: HEAD
add comments about kernel options for wm

<table class="center">
<tr>
  <th>driver</th>
  <th>where dmamem is allocated in</th>
  <th>variations of mutex</th>
  <th>if_init lock</th>
  <th>if_start lock</th>
  <th>if_stop lock</th>
  <th>if_ioctl lock</th>
  <th>softint(9)based TX and RX?</th>
  <th>TX and TX are locked with mutex</th>
  <th>callout lock</th>
  <th>MSI / MSI-X support</th>
  <th>Multi-queue support</th>
  <th>notes</th>
</tr>
<tr>
  <th>wm</th>
  <td>in attach()</td>
  <td>tx, rx, core</td>
  <td>CORE_LOCK(spin mutex)</td>
  <td>TX_LOCK(spin mutex) + sc_stopping flag</td>
  <td>CORE_LOCK(spin mutex)+sc_stopping flag</td>
  <td>use CORE_LOCK(spin mutex) and TX_LOCK(spin mutex) partially</td>
  <td>Yes by default. It can be changed by kernel options. See wm.4.</td>
  <td>TX and RX differently</td>
  <td>TX_LOCK(mutex) and check sc_stopping in the beginning</td>
  <td>Yes</td>
  <td>TX and RX</td>
  <td></td>
</tr>
<tr>
  <th>vioif</th>
  <td>in attach()</td>
  <td>tx, rx, ctrl_wait</td>
  <td>not taken?</td>
  <td>TX_LOCK(mutex)+sc_stopping check</td>
  <td>TX, RX + sc_stopping check</td>
  <td>splnet()</td>
  <td>only RX is softint'ed</td>
  <td>TX and RX differently</td>
  <td>callout isn't used</td>
  <td>Yes (MSI-X only)</td>
  <td>No</td>
  <td></td>
</tr>
<tr>
  <th>vmxnet</th>
  <td></td>
  <td></td>
  <td></td>
  <td></td>
  <td></td>
  <td></td>
  <td></td>
  <td></td>
  <td></td>
  <td></td>
  <td></td>
  <td></td>
</tr>
<tr>
  <th>pq3etsec</th>
  <td>in attach()</td>
  <td>lock, hwlock, mdio_lock</td>
  <td>not taken?</td>
  <td>not taken. Set flag with atomic_or_uint() and call softintr_schedule()</td>
  <td>not taken?</td>
  <td>splnet()</td>
  <td>Yes</td>
  <td>sc_hwlock is for hard interrput. sc_lock is for software interrupt. TX and RX use the same lock</td>
  <td>mutex_enter(sc_lock)</td>
  <td></td>
  <td></td>
  <td></td>
</tr>
<tr>
  <th>bcmeth(4)</th>
  <td>in attach()</td>
  <td>lock, hwlock</td>
  <td>not taken?</td>
  <td>not taken. Set flag with atomic_or_uint() and call softintr_schedule()</td>
  <td>not taken?</td>
  <td>splnet()</td>
  <td>Yes. The interrupt handler calls softint or workqueue depending on the load.</td>
  <td>sc_hwlock is for hard interrput. sc_lock is for software interrupt. TX and RX use the same lock</td>
  <td>callout isn't used</td>
  <td></td>
  <td></td>
  <td></td>
</tr>
<tr>
  <th>ixg</th>
  <td>in init() for rx jumbo, in attach() for others</td>
  <td>tx, rx, core</td>
  <td>CORE_LOCK(adaptive mutex)</td>
  <td>TX_LOCK(spin mutex)</td>
  <td>CORE_LOCK(spin mutex)</td>
  <td>use core lock for init() and set_multi()</td>
  <td>Yes. Only one time is execulted in the interupt context. If more request exist, softint is issued.</td>
  <td>TX and RX differently</td>
  <td>CORE_LOCK() in the beginning</td>
  <td></td>
  <td></td>
  <td></td>
</tr>
<tr>
  <th>bnx</th>
  <td>in attach()</td>
  <td>tx</td>
  <td>splnet() in the beginning</td>
  <td>not taken?</td>
  <td>not taken?</td>
  <td>splnet() in the beginning</td>
  <td>No</td>
  <td>only TX uses mutex</td>
  <td>splnet() in the beginning</td>
  <td></td>
  <td></td>
  <td></td>
</tr>
<tr>
  <th>bge</th>
  <td>in attach()</td>
  <td>none</td>
  <td>splnet() in the beginning</td>
  <td>not taken?</td>
  <td>not taken?</td>
  <td>splnet() in the beginning</td>
  <td>No</td>
  <td>No</td>
  <td>splnet() in the beginning</td>
  <td></td>
  <td></td>
  <td>mutex is not used at all</td>
</tr>
</table>

CVSweb for NetBSD wikisrc <wikimaster@NetBSD.org> software: FreeBSD-CVSweb