Đang chuẩn bị liên kết để tải về tài liệu:
More 82573L details: Getting ready to write and test a character-mode device-driver for our anchor-LAN’s ethernet controllers

Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ

More 82573L details: Getting ready to write and test a character-mode device-driver for our anchor-LAN’s ethernet controllers presents about Statistics registers, Initializing the nic’s counters, Ethernet packet layout, Filter registers. | More 82573L details Getting ready to write and test a character-mode device-driver for our anchor-LAN’s ethernet controllers A ‘nic.c’ character driver? my_fops my_isr() ioctl my_ioctl() open my_open() read my_read() write my_write() release my_release() module_init() module_exit() Statistics registers • The 82573L has several dozen statistical counters which automatically operate to keep track of significant events affecting the ethernet controller’s performance • Most are 32-bit ‘read-only’ registers, and they are automatically cleared when read • Your module’s initialization routine could read them all (to start counting from zero) Initializing the nic’s counters • The statistical counters all have addressoffsets in the range 0x04000 – 0x04FFF • You can use a very simple program-loop to ‘clear’ each of these read-only registers // Here ‘io’ is the virtual base-address of the nic’s i/o-memory region { int r; // clear all of the Pro/1000 controller’s statistical counters for (r = 0x4000; r < 0x4FFF; r += 4) ioread32( io + r ); } A few ‘counter’ examples 0x4000 0x400C 0x4014 0x4018 0x4074 0x4078 0x407C 0x40D0 0x40D4 0x40F0 0x40F4 CRCERRS RXERRC SCC ECOL GPRC BPRC MPRC TPR TPT MPTC BPTC CRC Errors Count Receive Error Count Single Collision Count Excessive Collision Count Good Packets Received Broadcast Packets Received Multicast Packets Received Total Packets Received Total Packets Transmitted Multicast Packets Transmitted Broadcast Packets .

TÀI LIỆU LIÊN QUAN