I am just playing with DPDK here to get some hands on experience of tools to generate packets for that i have setup tow VMs on VMware ESXi.
VM-A
and VM-B
are connected back to back with Internal_vSwitch
I have compiled DPDK and l2fwd
on VM-B
and pktgen
on VM-A but when i run pktgen do start all
doesn't showing generating any packets. because of my limited knowledge i am not able to debug what could be wrong.
Grub (i did configure hugepage from command line not grub)
root@VM-A:~/pktgen-dpdk-pktgen-20.11.3/usr/local/bin# cat /proc/cmdline
BOOT_IMAGE=/vmlinuz-5.4.0-91-generic root=/dev/mapper/vg0-root ro
HugePage
root@VM-A:~/pktgen-dpdk-pktgen-20.11.3/usr/local/bin# hugeadm --pool-list
Size Minimum Current Maximum Default
2097152 2048 2048 2048 *
1073741824 0 0 0
binding port
root@VM-B:~/pktgen-dpdk-pktgen-20.11.3/usr/local/bin# dpdk-devbind.py -s
Network devices using DPDK-compatible driver
============================================
0000:0b:00.0 'VMXNET3 Ethernet Controller 07b0' drv=uio_pci_generic unused=vmxnet3,vfio-pci
Network devices using kernel driver
===================================
0000:03:00.0 'VMXNET3 Ethernet Controller 07b0' if=ens160 drv=vmxnet3 unused=vfio-pci,uio_pci_generic *Active*
Pktgen not generating any packet. all the counters are zero.
root@VM-A:~/pktgen-dpdk-pktgen-20.11.3/usr/local/bin# ./pktgen -l 1-2 -n 1 -- -P -N -T -m "3.0"
Copyright (c) <2010-2020>, Intel Corporation. All rights reserved. Powered by DPDK
EAL: Detected 4 lcore(s)
EAL: Detected 1 NUMA nodes
EAL: Detected shared linkage of DPDK
EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
EAL: Selected IOVA mode 'PA'
EAL: No available hugepages reported in hugepages-1048576kB
EAL: Probing VFIO support...
EAL: VFIO support initialized
EAL: Probe PCI driver: net_vmxnet3 (15ad:7b0) device: 0000:0b:00.0 (socket 0)
EAL: No legacy callbacks, legacy socket not created
*** Copyright (c) <2010-2020>, Intel Corporation. All rights reserved.
*** Pktgen created by: Keith Wiles -- >>> Powered by DPDK <<<
Port: Name IfIndex Alias NUMA PCI
0: net_vmxnet3 0 0 15ad:07b0/0b:00.0
Initialize Port 0 -- TxQ 1, RxQ 1
Src MAC 00:0c:29:ae:70:dc
<Promiscuous mode Enabled>
WARNING: Nothing to do on lcore 2: exiting
- Ports 0-0 of 1 <Main Page> Copyright (c) <2010-2020>, Intel Corporation
Flags:Port : P------Single :0
|ink State : <UP-10000-FD> ---Total Rate---
-kts/s Max/Rx : P------Single :0 0/0
| Ports 0-0 of 1 <Main Page> Copyright (c) <2010-2020>, Intel Corporation
/ Flags:Port : P------Single :0 3/1
Link State : P------Single :0 ---Total Rate---
Pkts/s Max/Rx : <UP-10000-FD> 3/0
Max/Tx : 3/0 3/0
MBits/s Rx/Tx : 0/0 0/0
Broadcast : 0/0 0/0
Multicast : 0
Sizes 64 : 0
65-127 : 0
128-255 : 0
256-511 : 0
512-1023 : 0
1024-1518 : 0
Runts/Jumbos : 0
ARP/ICMP Pkts : 0/0
Errors Rx/Tx : 0/0
Total Rx Pkts : 0/0
Tx Pkts : 10
Rx MBs : 0
Tx MBs : 0
TTL/Port Src/Dest : 0
Pattern Type : abcd...
Tx Count/% Rate : Forever /100%
Pkt Size/Tx Burst : 64 / 32
TTL/Port Src/Dest : 4/ 1234/ 5678
Pkt Type:VLAN ID : IPv4 / TCP:0001
802.1p CoS/DSCP/IPP : 0/ 0/ 0
VxLAN Flg/Grp/vid : 0000/ 0/ 0
IP Destination : 192.168.1.1y DPDK (pid:1957) -----------------
Source : 192.168.0.1/24rface without timers
MAC Destination : 00:00:00:00:00:00
Source : 00:0c:29:ae:70:dc
-- Pktgen 20.11.3 (D: 15ad:07b0/0b:00.0y DPDK (pid:1957) -----------------
Pktgen:/> start all
Pktgen:/>
The issue is related to the incorrect command-line configuration set for DPDK-PKTGEN .
./pktgen -l 1-2 -n 1 -- -P -N -T -m "3.0"
./pktgen -l 1-2 -n 1 -- -P -N -T -m "2.0"
reason: pktgen option -m "3.0" stands for do RX and TX on CPU core 3. But as per DPDK lcore arguments, only core 1 and core 2
is passed as dpdk arguments. Hence rectifying the same to -m "2.0" solves the same.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.