From owner-freebsd-net Wed May 9 7:14: 7 2001 Delivered-To: freebsd-net@freebsd.org Received: from roura.ac.upc.es (roura.ac.upc.es [147.83.33.10]) by hub.freebsd.org (Postfix) with ESMTP id 000B237B422 for ; Wed, 9 May 2001 07:14:02 -0700 (PDT) (envelope-from oscar@ac.upc.es) Received: from ac.upc.es (fonoll.ac.upc.es [147.83.32.14]) by roura.ac.upc.es (8.11.0/8.11.0) with ESMTP id f49EDq418752 for ; Wed, 9 May 2001 16:13:53 +0200 (MET DST) Message-ID: <3AF950A1.2D4A13F2@ac.upc.es> Date: Wed, 09 May 2001 16:13:53 +0200 From: Oscar-Ivan Lepe-Aldama Organization: DAC/UPC X-Mailer: Mozilla 4.76 [en] (X11; U; SunOS 5.7 sun4u) X-Accept-Language: es, en MIME-Version: 1.0 To: net@freebsd.org Subject: On the workings of the xl dirver Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Hi, I would like to have information regarding the implementation of the xl_start_90xB function in the xl driver. After reading the code and the technical reference from 3com I still cannot understand how the driver signals the NIC for packet downloading. I know the code is OK as my FreeBSD box, loaded with a pair of 3C905B-TX NICs, works just fine: it forwards packets. But because I am interested in measuring the performance of the system (both software and hardware) I need to know the points where the software signals the hardware. Please help. Some details follow. In the case of the xl_start function (the xl driver has two implementations of the if_start operation: xl_start_90xB for 3c90xB NICs and xl_start for others) this is clear. It uses the following code, which follows the algorithm presented in the technical reference: 2276 /* 2277 * Queue the packets. If the TX channel is clear, update 2278 * the downlist pointer register. 2279 */ 2280 CSR_WRITE_2(sc, XL_COMMAND, XL_CMD_DOWN_STALL); 2281 xl_wait(sc); 2282 2283 if (sc->xl_cdata.xl_tx_head != NULL) { 2284 sc->xl_cdata.xl_tx_tail->xl_next = start_tx; 2285 sc->xl_cdata.xl_tx_tail->xl_ptr->xl_next = 2286 vtophys(start_tx->xl_ptr); 2287 sc->xl_cdata.xl_tx_tail->xl_ptr->xl_status &= 2288 ~XL_TXSTAT_DL_INTR; 2289 sc->xl_cdata.xl_tx_tail = cur_tx; 2290 } else { 2291 sc->xl_cdata.xl_tx_head = start_tx; 2292 sc->xl_cdata.xl_tx_tail = cur_tx; 2293 } 2294 if (!CSR_READ_4(sc, XL_DOWNLIST_PTR)) 2295 CSR_WRITE_4(sc, XL_DOWNLIST_PTR, vtophys(start_tx->xl_ptr)); 2296 2297 CSR_WRITE_2(sc, XL_COMMAND, XL_CMD_DOWN_UNSTALL); But in the case of the xl_start_90xB the code is like this: 2426 /* Start transmission */ 2427 sc->xl_cdata.xl_tx_prod = idx; 2428 start_tx->xl_prev->xl_ptr->xl_next = start_tx->xl_phys; As can be seen in this last case, there are no CSR_WRITE operations for signaling the NIC. However, the technical reference says the NIC has to be signaled for it to learn there is work to do. How is this being implemented is this case? Thanks. Best regards, -- ======================================================================== 0 0 0 Oscar-Ivan Lepe-Aldama | UPC-Campus Nord, DAC 0 0 0 e-mail: oscar@ac.upc.es | Modul D6, despatx 116 0 0 0 phone: +34 93 401 7187 | Jordi Girona, 1-3 U P C fax: +34 93 401 7055 | 08034 Barcelona - SPAIN WWW: http://www.ac.upc.es/homes/oscar/ ======================================================================== To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message