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

1.2     ! wiki        1: <table class="center">
        !             2: <tr>
        !             3:   <th>driver</th>
        !             4:   <th>where dmemem 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>notes</th>
        !            14: </tr>
        !            15: <tr>
        !            16:   <th>wm(knakahara)</th>
        !            17:   <td>in attach()</td>
        !            18:   <td>tx, rx, core</td>
        !            19:   <td>CORE_LOCK(spin mutex)</td>
        !            20:   <td>TX_LOCK(spin mutex) + sc_stopping flag</td>
        !            21:   <td>CORE_LOCK(spin mutex)+sc_stopping flag</td>
        !            22:   <td>use CORE_LOCK() and TX_LOCK() partially</td>
        !            23:   <td>no</td>
        !            24:   <td>TX and RX differently</td>
        !            25:   <td>TX_LOCK(mutex) and check sc_stopping in the beginning</td>
        !            26:   <td></td>
        !            27: </tr>
        !            28: <tr>
        !            29:   <th>vioif</th>
        !            30:   <td>in attach()</td>
        !            31:   <td>tx, rx, ctrl_wait</td>
        !            32:   <td>not taken?</td>
        !            33:   <td>TX_LOCK(mutex)+sc_stopping check</td>
        !            34:   <td>TX, RX + sc_stopping check</td>
        !            35:   <td>splnet</td>
        !            36:   <td>only RX is softint'ed</td>
        !            37:   <td>TX and RX differently</td>
        !            38:   <td>callout isn't used</td>
        !            39:   <td></td>
        !            40: </tr>
        !            41: <tr>
        !            42:   <th>vmxnet</th>
        !            43:   <td></td>
        !            44:   <td></td>
        !            45:   <td></td>
        !            46:   <td></td>
        !            47:   <td></td>
        !            48:   <td></td>
        !            49:   <td></td>
        !            50:   <td></td>
        !            51:   <td></td>
        !            52:   <td></td>
        !            53: </tr>
        !            54: <tr>
        !            55:   <th>pq3etsec</th>
        !            56:   <td>in attach()</td>
        !            57:   <td>lock, hwlock, mdio_lock</td>
        !            58:   <td>not taken?</td>
        !            59:   <td>not taken. Set flag with atomic_or_uint() and call softintr_schedule()</td>
        !            60:   <td>not taken?</td>
        !            61:   <td>splnet()</td>
        !            62:   <td>Yes</td>
        !            63:   <td>sc_hwlock is for hard interrput. sc_lock is for software interrupt. TX and RX use the same lock</td>
        !            64:   <td>mutex_enter(sc_lock)</td>
        !            65:   <td></td>
        !            66: </tr>
        !            67: <tr>
        !            68:   <th>bcm53xx_eth</th>
        !            69:   <td>in attach()</td>
        !            70:   <td>lock, hwlock</td>
        !            71:   <td>not taken?</td>
        !            72:   <td>not taken. Set flag with atomic_or_uint() and call softintr_schedule()</td>
        !            73:   <td>not taken?</td>
        !            74:   <td>splnet()</td>
        !            75:   <td>Yes</td>
        !            76:   <td>sc_hwlock is for hard interrput. sc_lock is for software interrupt. TX and RX use the same lock</td>
        !            77:   <td>callout isn't used</td>
        !            78:   <td></td>
        !            79: </tr>
        !            80: <tr>
        !            81:   <th>ixg</th>
        !            82:   <td>in init() for rx jumbo, in attach() for others</td>
        !            83:   <td>tx, rx, core</td>
        !            84:   <td>CORE_LOCK(adaptive mutex)</td>
        !            85:   <td>TX_LOCK(spin mutex)</td>
        !            86:   <td>CORE_LOCK(spin mutex)</td>
        !            87:   <td>use core lock for init() and set_multi()</td>
        !            88:   <td>Yes. Only one time is execulted in the interupt context. If more request exist, softint is issued.</td>
        !            89:   <td>TX and RX differently</td>
        !            90:   <td>CORE_LOCK() in the beginning</td>
        !            91:   <td></td>
        !            92: </tr>
        !            93: <tr>
        !            94:   <th>bnx</th>
        !            95:   <td>in attach()</td>
        !            96:   <td>tx</td>
        !            97:   <td>splnet() in the beginning</td>
        !            98:   <td>not taken?</td>
        !            99:   <td>not taken?</td>
        !           100:   <td>splnet() in the beginning</td>
        !           101:   <td>No</td>
        !           102:   <td>only TX uses mutex</td>
        !           103:   <td>splnet() in the beginning</td>
        !           104:   <td></td>
        !           105: </tr>
        !           106: <tr>
        !           107:   <th>bge</th>
        !           108:   <td>in attach()</td>
        !           109:   <td>none</td>
        !           110:   <td>splnet() in the beginning</td>
        !           111:   <td>not taken?</td>
        !           112:   <td>not taken?</td>
        !           113:   <td>splnet() in the beginning</td>
        !           114:   <td>No</td>
        !           115:   <td>No</td>
        !           116:   <td>splnet() in the beginning</td>
        !           117:   <td>mutex is not used at all</td>
        !           118: </tr>

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