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, 8 months ago) by knakahara
Branches: MAIN
CVS tags: HEAD
add comments about kernel options for wm

    1: <table class="center">
    2: <tr>
    3:   <th>driver</th>
    4:   <th>where dmamem is allocated in</th>
    5:   <th>variations of mutex</th>
    6:   <th>if_init lock</th>
    7:   <th>if_start lock</th>
    8:   <th>if_stop lock</th>
    9:   <th>if_ioctl lock</th>
   10:   <th>softint(9)based TX and RX?</th>
   11:   <th>TX and TX are locked with mutex</th>
   12:   <th>callout lock</th>
   13:   <th>MSI / MSI-X support</th>
   14:   <th>Multi-queue support</th>
   15:   <th>notes</th>
   16: </tr>
   17: <tr>
   18:   <th>wm</th>
   19:   <td>in attach()</td>
   20:   <td>tx, rx, core</td>
   21:   <td>CORE_LOCK(spin mutex)</td>
   22:   <td>TX_LOCK(spin mutex) + sc_stopping flag</td>
   23:   <td>CORE_LOCK(spin mutex)+sc_stopping flag</td>
   24:   <td>use CORE_LOCK(spin mutex) and TX_LOCK(spin mutex) partially</td>
   25:   <td>Yes by default. It can be changed by kernel options. See wm.4.</td>
   26:   <td>TX and RX differently</td>
   27:   <td>TX_LOCK(mutex) and check sc_stopping in the beginning</td>
   28:   <td>Yes</td>
   29:   <td>TX and RX</td>
   30:   <td></td>
   31: </tr>
   32: <tr>
   33:   <th>vioif</th>
   34:   <td>in attach()</td>
   35:   <td>tx, rx, ctrl_wait</td>
   36:   <td>not taken?</td>
   37:   <td>TX_LOCK(mutex)+sc_stopping check</td>
   38:   <td>TX, RX + sc_stopping check</td>
   39:   <td>splnet()</td>
   40:   <td>only RX is softint'ed</td>
   41:   <td>TX and RX differently</td>
   42:   <td>callout isn't used</td>
   43:   <td>Yes (MSI-X only)</td>
   44:   <td>No</td>
   45:   <td></td>
   46: </tr>
   47: <tr>
   48:   <th>vmxnet</th>
   49:   <td></td>
   50:   <td></td>
   51:   <td></td>
   52:   <td></td>
   53:   <td></td>
   54:   <td></td>
   55:   <td></td>
   56:   <td></td>
   57:   <td></td>
   58:   <td></td>
   59:   <td></td>
   60:   <td></td>
   61: </tr>
   62: <tr>
   63:   <th>pq3etsec</th>
   64:   <td>in attach()</td>
   65:   <td>lock, hwlock, mdio_lock</td>
   66:   <td>not taken?</td>
   67:   <td>not taken. Set flag with atomic_or_uint() and call softintr_schedule()</td>
   68:   <td>not taken?</td>
   69:   <td>splnet()</td>
   70:   <td>Yes</td>
   71:   <td>sc_hwlock is for hard interrput. sc_lock is for software interrupt. TX and RX use the same lock</td>
   72:   <td>mutex_enter(sc_lock)</td>
   73:   <td></td>
   74:   <td></td>
   75:   <td></td>
   76: </tr>
   77: <tr>
   78:   <th>bcmeth(4)</th>
   79:   <td>in attach()</td>
   80:   <td>lock, hwlock</td>
   81:   <td>not taken?</td>
   82:   <td>not taken. Set flag with atomic_or_uint() and call softintr_schedule()</td>
   83:   <td>not taken?</td>
   84:   <td>splnet()</td>
   85:   <td>Yes. The interrupt handler calls softint or workqueue depending on the load.</td>
   86:   <td>sc_hwlock is for hard interrput. sc_lock is for software interrupt. TX and RX use the same lock</td>
   87:   <td>callout isn't used</td>
   88:   <td></td>
   89:   <td></td>
   90:   <td></td>
   91: </tr>
   92: <tr>
   93:   <th>ixg</th>
   94:   <td>in init() for rx jumbo, in attach() for others</td>
   95:   <td>tx, rx, core</td>
   96:   <td>CORE_LOCK(adaptive mutex)</td>
   97:   <td>TX_LOCK(spin mutex)</td>
   98:   <td>CORE_LOCK(spin mutex)</td>
   99:   <td>use core lock for init() and set_multi()</td>
  100:   <td>Yes. Only one time is execulted in the interupt context. If more request exist, softint is issued.</td>
  101:   <td>TX and RX differently</td>
  102:   <td>CORE_LOCK() in the beginning</td>
  103:   <td></td>
  104:   <td></td>
  105:   <td></td>
  106: </tr>
  107: <tr>
  108:   <th>bnx</th>
  109:   <td>in attach()</td>
  110:   <td>tx</td>
  111:   <td>splnet() in the beginning</td>
  112:   <td>not taken?</td>
  113:   <td>not taken?</td>
  114:   <td>splnet() in the beginning</td>
  115:   <td>No</td>
  116:   <td>only TX uses mutex</td>
  117:   <td>splnet() in the beginning</td>
  118:   <td></td>
  119:   <td></td>
  120:   <td></td>
  121: </tr>
  122: <tr>
  123:   <th>bge</th>
  124:   <td>in attach()</td>
  125:   <td>none</td>
  126:   <td>splnet() in the beginning</td>
  127:   <td>not taken?</td>
  128:   <td>not taken?</td>
  129:   <td>splnet() in the beginning</td>
  130:   <td>No</td>
  131:   <td>No</td>
  132:   <td>splnet() in the beginning</td>
  133:   <td></td>
  134:   <td></td>
  135:   <td>mutex is not used at all</td>
  136: </tr>
  137: </table>

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