Hello again, Sorry Michael, but I am a kind of newbie in this subject and couldnt understand everything you said clearly. I'm working on my "final year project" (I think it's said like that, I mean the project you do when you finish your degree :P). The purpose of my project is to capture and analyze network packets as fast as I can.
So, I'll try to expose my doubts about this, and please don't be too concise, since I couldnt understand it. However, if there is a good reference I should read, tell me, since I couldnt get any good book entered in linux kernel networking. The only one I know about (and have read it) is "The Linux kernel networking Architecture", although it's quite old (kernel 2.4). I have also read "Linux Device Drivers 3rd Edition" and "Linux Kernel Development". Also, some articles about NAPI and interrupt coalescencing: "Eliminating Receive Livelock" by Jeffrey Mogul, "Beyond Sofnet" by Jada Salim and something more probably. I know the concepts of NAPI but have not seen any real driver in action, except for the Realtek 8139too. So here go the questions: > > rx_threshold_hit > Rx max coalescing frames threshold hit. Well, I didn't understand what is this threshold for > What bus is the NIC in? PCI or PCIX? What speed? You may want to play > around with the rx ring sizes and rx coalescing parameters, all can be > changed with ethtool. Also, be sure to use the latest tg3 driver which > is 3.45. I'm running Linux kernel 2.6.13 and tg3 version 3.37, so should be new enough. I dont know how to verify if the NIC is in a PCIX bus. How can I check that? Running lspci I can see there are some PCIX bridges: 0000:00:01.0 PCI bridge: Advanced Micro Devices [AMD] AMD-8131 PCI-X Bridge (rev 12) 0000:00:01.1 PIC: Advanced Micro Devices [AMD] AMD-8131 PCI-X IOAPIC 0000:00:02.0 PCI bridge: Advanced Micro Devices [AMD] AMD-8131 PCI-X Bridge (rev 12) 0000:00:02.1 PIC: Advanced Micro Devices [AMD] AMD-8131 PCI-X IOAPIC 0000:00:06.0 PCI bridge: Advanced Micro Devices [AMD] AMD-8111 PCI 0000:00:07.0 ISA bridge: Advanced Micro Devices [AMD] AMD-8111 LPC (.......) 0000:02:03.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5704 Gigabit Ethernet (rev 02) 0000:02:03.1 Ethernet controller: Broadcom Corporation NetXtreme BCM5704 Gigabit Ethernet (rev 02) Are the NICs in a PCI-X bus? The bridges at least are. I have seen I can change the rx ring entries with ethtool, although in the driver code it says that the size is fixed to 512 entries. So what you actually change is the pending entries (defaulting to 200). What does that mean? That even if the ring is 512 entries long, it seems to be full if there are 200 packets the kernel didn't get? As I said, the only driver I have read before is Realtek 8139too, which is quite simple, but at least I could find a tutorial which explains how it works. In that driver there was a rx_ring and a tx_ring (I don't know if there can be more than one in some other drivers). When a packet arrives the NIC stores in the rx_ring a packet descriptor (4 bytes, 2 for the packet length and 2 for the packet receive status), and just after that the packet itself. So the driver has just to read the descriptor and then read the following "packet length" bytes. As I have seen in tg3, the rx_ring seems to be only for packet descriptors. So, as I guess, the descriptor should contain also the address for the actual packet stored. Where is that packet stored? In another rx_ring just for incoming packets? What is the benefit comparing the way 8139too does it? To finish, what do you mean with changing coalescencing parameters? The dev->quota and budget? Are there more things I can change for my benefits? Thank you for your patience. Regards Aritz - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html