l3fwd測試出現問題2:
$ sudo ./examples/l3fwd/build/l3fwd -c 0x3 -n 4 -- -p 0x3 --config="(0,0,0),(1,0,1)"
EAL: Detected 2 lcore(s)
EAL: Multi-process socket /var/run/.rte_unix
EAL: Probing VFIO support...
EAL: PCI device 0000:03:00.0 on NUMA socket -1
EAL: Invalid NUMA socket, default to 0
EAL: probe driver: 15ad:7b0 net_vmxnet3
EAL: PCI device 0000:0b:00.0 on NUMA socket -1
EAL: Invalid NUMA socket, default to 0
EAL: probe driver: 15ad:7b0 net_vmxnet3
LPM or EM none selected, default LPM on
Initializing port 0 ... Creating queues: nb_rxq=1 nb_txq=2... Address:00:0C:29:32:5F:08, Destination:02:00:00:00:00:00, Allocated mbuf pool on socket 0
LPM: Adding route 0x01010100 / 24 (0)
LPM: Adding route 0x02010100 / 24 (1)
LPM: Adding route IPV6 / 48 (0)
LPM: Adding route IPV6 / 48 (1)
txq=0,0,0 txq=1,1,0
Initializing port 1 ... Creating queues: nb_rxq=1 nb_txq=2... Address:00:0C:29:32:5F:12, Destination:02:00:00:00:00:01, txq=0,0,0 txq=1,1,0
Initializing rx queues on lcore 0 ... rxq=0,0,0
Initializing rx queues on lcore 1 ... rxq=1,0,0
port 0 cannot parse RTE_PTYPE_L3_IPV6
port 0 cannot parse packet type, please add --parse-ptype
EAL: Error - exiting with code: 1
Cause: ptype check fails
問題原因:
virtio或其他設備不能運行l3fwd,因爲這些設備可能部支持hw_ip_checksum,即硬件ip檢測
解決方法:
使用新添加的選項–parse-ptype
$ sudo ./examples/l3fwd/build/l3fwd -c 0x3 -n 4 -- -p 0x3 --config="(0,0,0),(1,0,1)" --parse-ptype
EAL: Detected 2 lcore(s)
EAL: Multi-process socket /var/run/.rte_unix
EAL: Probing VFIO support...
EAL: PCI device 0000:03:00.0 on NUMA socket -1
EAL: Invalid NUMA socket, default to 0
EAL: probe driver: 15ad:7b0 net_vmxnet3
EAL: PCI device 0000:0b:00.0 on NUMA socket -1
EAL: Invalid NUMA socket, default to 0
EAL: probe driver: 15ad:7b0 net_vmxnet3
soft parse-ptype is enabled
LPM or EM none selected, default LPM on
Initializing port 0 ... Creating queues: nb_rxq=1 nb_txq=2... Address:00:0C:29:32:5F:08, Destination:02:00:00:00:00:00, Allocated mbuf pool on socket 0
LPM: Adding route 0x01010100 / 24 (0)
LPM: Adding route 0x02010100 / 24 (1)
LPM: Adding route IPV6 / 48 (0)
LPM: Adding route IPV6 / 48 (1)
txq=0,0,0 txq=1,1,0
Initializing port 1 ... Creating queues: nb_rxq=1 nb_txq=2... Address:00:0C:29:32:5F:12, Destination:02:00:00:00:00:01, txq=0,0,0 txq=1,1,0
Initializing rx queues on lcore 0 ... rxq=0,0,0
Initializing rx queues on lcore 1 ... rxq=1,0,0
Port 0: softly parse packet type info
Port 1: softly parse packet type info
Checking link statusdone
Port0 Link Up. Speed 10000 Mbps -full-duplex
Port1 Link Up. Speed 10000 Mbps -full-duplex
L3FWD: entering main loop on lcore 1
L3FWD: -- lcoreid=1 portid=1 rxqueueid=0
L3FWD: entering main loop on lcore 0
L3FWD: -- lcoreid=0 portid=0 rxqueueid=0