Annotation of wikisrc/users/msaitoh/Comparison_of_implementations_of_Ethernet_drivers.mdwn, revision 1.8

1.2       wiki        1: <table class="center">
                      2: <tr>
                      3:   <th>driver</th>
1.5       wiki        4:   <th>where dmamem is allocated in</th>
1.2       wiki        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>
1.6       wiki       13:   <th>MSI / MSI-X support</th>
                     14:   <th>Multi-queue support</th>
1.2       wiki       15:   <th>notes</th>
                     16: </tr>
                     17: <tr>
1.6       wiki       18:   <th>wm</th>
1.2       wiki       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>
1.4       wiki       24:   <td>use CORE_LOCK(spin mutex) and TX_LOCK(spin mutex) partially</td>
                     25:   <td>No</td>
1.2       wiki       26:   <td>TX and RX differently</td>
                     27:   <td>TX_LOCK(mutex) and check sc_stopping in the beginning</td>
1.6       wiki       28:   <td>Yes</td>
1.8     ! wiki       29:   <td>TX and RX</td>
1.2       wiki       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>
1.4       wiki       39:   <td>splnet()</td>
1.2       wiki       40:   <td>only RX is softint'ed</td>
                     41:   <td>TX and RX differently</td>
                     42:   <td>callout isn't used</td>
1.6       wiki       43:   <td>Yes (MSI-X only)</td>
                     44:   <td>No</td>
1.2       wiki       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>
1.6       wiki       59:   <td></td>
                     60:   <td></td>
1.2       wiki       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>
1.6       wiki       74:   <td></td>
                     75:   <td></td>
1.2       wiki       76: </tr>
                     77: <tr>
1.7       wiki       78:   <th>bcmeth(4)</th>
1.2       wiki       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>
1.7       wiki       85:   <td>Yes. The interrupt handler calls softint or workqueue depending on the load.</td>
1.2       wiki       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>
1.6       wiki       89:   <td></td>
                     90:   <td></td>
1.2       wiki       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>
1.6       wiki      104:   <td></td>
                    105:   <td></td>
1.2       wiki      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>
1.6       wiki      119:   <td></td>
                    120:   <td></td>
1.2       wiki      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>
1.6       wiki      133:   <td></td>
                    134:   <td></td>
1.2       wiki      135:   <td>mutex is not used at all</td>
                    136: </tr>
1.3       wiki      137: </table>

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