wheezy linux kernel 3.2.0.4 和 Intel Corporation 82599EB 10 千兆网卡的 netmap 问题

wheezy linux kernel 3.2.0.4 和 Intel Corporation 82599EB 10 千兆网卡的 netmap 问题

我已经在内核为 3.2.0.4 的 debian wheezy 上编译了 netmap 驱动程序,并从 netmap 驱动程序代码中安装了 ixgbe 补丁模块。当我在删除默认 ixgbe 模块后插入模块时,我得到了以下输出。

[64228.332381] 175.533442 netmap_new_obj_allocator [426] objsize 1024 clustsize 4096 objects 4
[64228.332564] 175.533627 netmap_new_obj_allocator [504] Pre-allocated 128 clusters (4/512KB) for 'netmap_if'
[64228.332641] 175.533704 netmap_new_obj_allocator [426] objsize 36864 clustsize 36864 objects 1
[64228.335246] 175.536308 netmap_new_obj_allocator [504] Pre-allocated 200 clusters (36/7200KB) for 'netmap_ring'
[64228.335319] 175.536383 netmap_new_obj_allocator [426] objsize 2048 clustsize 4096 objects 2
[64228.392241] 175.593318 netmap_new_obj_allocator [504] Pre-allocated 50000 clusters (4/200000KB) for 'netmap_buf'
[64228.392324] 175.593404 netmap_memory_init [554] Have 512 KB for interfaces, 7200 KB for rings and 195 MB for buffers
[64228.392400] netmap: loaded module with 202 Mbytes
[64238.599776] ixgbe: Intel(R) 10 Gigabit PCI Express Network Driver - version 3.6.7-k
[64238.599781] ixgbe: Copyright (c) 1999-2011 Intel Corporation.
[64238.599888] ixgbe 0000:05:00.0: setting latency timer to 64
[64238.752753] ixgbe 0000:05:00.0: irq 83 for MSI/MSI-X
[64238.752770] ixgbe 0000:05:00.0: irq 84 for MSI/MSI-X
[64238.752785] ixgbe 0000:05:00.0: irq 85 for MSI/MSI-X
[64238.752799] ixgbe 0000:05:00.0: irq 86 for MSI/MSI-X
[64238.752813] ixgbe 0000:05:00.0: irq 87 for MSI/MSI-X
[64238.752827] ixgbe 0000:05:00.0: irq 88 for MSI/MSI-X
[64238.752841] ixgbe 0000:05:00.0: irq 89 for MSI/MSI-X
[64238.752855] ixgbe 0000:05:00.0: irq 90 for MSI/MSI-X
[64238.752869] ixgbe 0000:05:00.0: irq 91 for MSI/MSI-X
[64238.752883] ixgbe 0000:05:00.0: irq 92 for MSI/MSI-X
[64238.752897] ixgbe 0000:05:00.0: irq 93 for MSI/MSI-X
[64238.752911] ixgbe 0000:05:00.0: irq 94 for MSI/MSI-X
[64238.752925] ixgbe 0000:05:00.0: irq 95 for MSI/MSI-X
[64238.752939] ixgbe 0000:05:00.0: irq 96 for MSI/MSI-X
[64238.752953] ixgbe 0000:05:00.0: irq 97 for MSI/MSI-X
[64238.752969] ixgbe 0000:05:00.0: irq 98 for MSI/MSI-X
[64238.752984] ixgbe 0000:05:00.0: irq 99 for MSI/MSI-X
[64238.753023] ixgbe 0000:05:00.0: Multiqueue Enabled: Rx Queue count = 16, Tx Queue count = 16
[64238.753112] ixgbe 0000:05:00.0: (PCI Express:5.0GT/s:Width x8) a0:36:9f:13:88:c4
[64238.753443] ixgbe 0000:05:00.0: MAC: 2, PHY: 14, SFP+: 5, PBA No: G28774-000
[64238.759157] ixgbe 0000:05:00.0: Intel(R) 10 Gigabit Network Connection
[64238.759243] ixgbe 0000:05:00.1: setting latency timer to 64
[64238.924579] ixgbe 0000:05:00.1: irq 100 for MSI/MSI-X
[64238.924596] ixgbe 0000:05:00.1: irq 101 for MSI/MSI-X
[64238.924611] ixgbe 0000:05:00.1: irq 102 for MSI/MSI-X
[64238.924625] ixgbe 0000:05:00.1: irq 103 for MSI/MSI-X
[64238.924639] ixgbe 0000:05:00.1: irq 104 for MSI/MSI-X
[64238.924653] ixgbe 0000:05:00.1: irq 105 for MSI/MSI-X
[64238.924667] ixgbe 0000:05:00.1: irq 106 for MSI/MSI-X
[64238.924681] ixgbe 0000:05:00.1: irq 107 for MSI/MSI-X
[64238.924696] ixgbe 0000:05:00.1: irq 108 for MSI/MSI-X
[64238.924711] ixgbe 0000:05:00.1: irq 109 for MSI/MSI-X
[64238.924725] ixgbe 0000:05:00.1: irq 110 for MSI/MSI-X
[64238.924739] ixgbe 0000:05:00.1: irq 111 for MSI/MSI-X
[64238.924753] ixgbe 0000:05:00.1: irq 112 for MSI/MSI-X
[64238.924768] ixgbe 0000:05:00.1: irq 113 for MSI/MSI-X
[64238.924782] ixgbe 0000:05:00.1: irq 114 for MSI/MSI-X
[64238.924796] ixgbe 0000:05:00.1: irq 115 for MSI/MSI-X
[64238.924810] ixgbe 0000:05:00.1: irq 116 for MSI/MSI-X
[64238.924850] ixgbe 0000:05:00.1: Multiqueue Enabled: Rx Queue count = 16, Tx Queue count = 16
[64238.924939] ixgbe 0000:05:00.1: (PCI Express:5.0GT/s:Width x8) a0:36:9f:13:88:c6
[64238.925268] ixgbe 0000:05:00.1: MAC: 2, PHY: 14, SFP+: 6, PBA No: G28774-000
[64238.931016] ixgbe 0000:05:00.1: Intel(R) 10 Gigabit Network Connection

使用 ifconfig 调出后,dmesg 输出如下

[64292.042335] ADDRCONF(NETDEV_UP): eth4: link is not ready
[64292.104163] ixgbe 0000:05:00.0: eth4: detected SFP+: 5
[64292.244127] ixgbe 0000:05:00.0: eth4: NIC Link is Up 10 Gbps, Flow Control: RX/TX
[64292.246029] ADDRCONF(NETDEV_CHANGE): eth4: link becomes ready
[64294.837398] ADDRCONF(NETDEV_UP): eth5: link is not ready
[64294.907328] ixgbe 0000:05:00.1: eth5: detected SFP+: 6
[64295.039295] ixgbe 0000:05:00.1: eth5: NIC Link is Up 10 Gbps, Flow Control: RX/TX
[64295.041188] ADDRCONF(NETDEV_CHANGE): eth5: link becomes ready

所以直到这里一切似乎都很好,但是当我尝试运行 pkt-gen 工具(一个示例程序)时,它给出了输出

./pkt-gen -i eth5 -f tx -n 500111222 -l 60 -w 5
extract_ip_range [119] extract IP range from 10.0.0.1
extract_ip_range [129] 10.0.0.1 starts at 10.0.0.1
extract_ip_range [119] extract IP range from 10.1.0.1
extract_ip_range [129] 10.1.0.1 starts at 10.1.0.1
extract_mac_range [135] extract MAC range from a0:36:9f:13:88:c6
extract_mac_range [150] a0:36:9f:13:88:c6 starts at a0:36:9f:13:88:c6
extract_mac_range [135] extract MAC range from ff:ff:ff:ff:ff:ff
extract_mac_range [150] ff:ff:ff:ff:ff:ff starts at ff:ff:ff:ff:ff:ff
main [1053] map size is 207712 Kb
main [1054] rx_rings  0 
main [1060] Unable to get if info for eth5
main [1067] bad nthreads 1, have 0 queues
main [1076] mmapping 207712 Kbytes
main [1095] Unable to register interface eth5
Sending on eth5: 0 queues, 1 threads and 1 cpus.
10.0.0.1 -> 10.1.0.1 (a0:36:9f:13:88:c6 -> ff:ff:ff:ff:ff:ff)
main [1129] Wait 5 secs for phy reset
main [1131] Ready...
main [1182] Unable to register eth5
main [1243] 0 pps
Sent 0 packets, 60 bytes each, in 0.00 seconds.
Speed: -nanpps. Bandwidth: -nanbps.

所以在我看来,程序无法访问设备信息,我想知道我是否错过了什么,或者我尝试使用的 ixgbe 驱动程序代码存在问题,或者其他问题。

相关内容