# Laptop: bensley@ubuntu-laptop:/opt/dpdk/dpdk-17.08/usertools$ uname -a Linux ubuntu-laptop 4.11.0-041100-generic #201705041534 SMP Thu May 4 19:36:05 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux bensley@ubuntu-laptop:/opt/dpdk/dpdk-17.08/usertools$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 16.04.3 LTS Release: 16.04 Codename: xenial bensley@ubuntu-laptop:/opt/dpdk/dpdk-17.08/drivers/net/e1000$ lspci -nn | grep Eth 00:19.0 Ethernet controller [0200]: Intel Corporation 82579LM Gigabit Network Connection [8086:1502] (rev 04) # This 82579 is not recognised as a supported NIC but we can force it by adding it to the driver and recompiling... bensley@ubuntu-laptop:/opt/dpdk/dpdk-17.08/drivers/net/e1000$ grep -r 1502 * base/e1000_hw.h:#define E1000_DEV_ID_PCH2_LV_LM 0x1502 bensley@ubuntu-laptop:/opt/dpdk/dpdk-17.08/drivers/net/e1000$ grep -r E1000_DEV_ID_PCH2_LV_LM * base/e1000_hw.h:#define E1000_DEV_ID_PCH2_LV_LM 0x1502 base/e1000_api.c: case E1000_DEV_ID_PCH2_LV_LM: em_ethdev.c: { RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_PCH2_LV_LM) }, em_ethdev.c: case E1000_DEV_ID_PCH2_LV_LM: # I added those two entries to em_ethdev.c and re-compiled DPDK and Ptkgen, then loaded the Kernel modules... bensley@ubuntu-laptop:/opt/dpdk/dpdk-17.08/usertools$ lsmod | grep uio bensley@ubuntu-laptop:/opt/dpdk/dpdk-17.08/usertools$ sudo modprobe uio bensley@ubuntu-laptop:/opt/dpdk/dpdk-17.08/usertools$ lsmod | grep uio uio 20480 0 bensley@ubuntu-laptop:/opt/dpdk/dpdk-17.08/usertools$ sudo insmod ../x86_64-native-linuxapp-gcc/kmod/igb_uio.ko bensley@ubuntu-laptop:/opt/dpdk/dpdk-17.08/usertools$ lsmod | grep uio igb_uio 16384 0 uio 20480 1 igb_uio bensley@ubuntu-laptop:/opt/dpdk/dpdk-17.08/usertools$ modinfo uio filename: /lib/modules/4.11.0-041100-generic/kernel/drivers/uio/uio.ko license: GPL v2 srcversion: FDF4916912702F8416DE197 depends: intree: Y vermagic: 4.11.0-041100-generic SMP mod_unload bensley@ubuntu-laptop:/opt/dpdk/dpdk-17.08/usertools$ modinfo ../x86_64-native-linuxapp-gcc/kmod/igb_uio.ko filename: /opt/dpdk/dpdk-17.08/usertools/../x86_64-native-linuxapp-gcc/kmod/igb_uio.ko author: Intel Corporation license: GPL description: UIO driver for Intel IGB PCI cards srcversion: 964321D18A4C7273AE8B3D5 depends: uio vermagic: 4.11.0-041100-generic SMP mod_unload parm: intr_mode:igb_uio interrupt mode (default=msix): msix Use MSIX interrupt legacy Use Legacy interrupt (charp) bensley@ubuntu-laptop:/opt/dpdk/dpdk-17.08/usertools$ sudo lshw -c network *-network description: Ethernet interface product: 82579LM Gigabit Network Connection vendor: Intel Corporation physical id: 19 bus info: pci@0000:00:19.0 logical name: enp0s25 version: 04 serial: 3c:97:0e:bd:62:82 size: 10Mbit/s capacity: 1Gbit/s width: 32 bits clock: 33MHz capabilities: pm msi bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation configuration: autonegotiation=on broadcast=yes driver=e1000e driverversion=3.2.6-k duplex=full firmware=0.13-3 ip=169.254.61.134 latency=0 link=yes multicast=yes port=twisted pair speed=10Mbit/s resources: irq:25 memory:f2500000-f251ffff memory:f253a000-f253afff ioport:5060(size=32) bensley@ubuntu-laptop:/opt/dpdk/dpdk-17.08/usertools$ sudo ip link set down enp0s25 bensley@ubuntu-laptop:/opt/dpdk/dpdk-17.08/usertools$ ip l show dev enp0s25 7: enp0s25: mtu 1500 qdisc pfifo_fast state DOWN mode DEFAULT group default qlen 1000 link/ether 3c:97:0e:bd:62:82 brd ff:ff:ff:ff:ff:ff bensley@ubuntu-laptop:/opt/dpdk/dpdk-17.08/usertools$ sudo ./dpdk-devbind.py -u 00:19.0 bensley@ubuntu-laptop:/opt/dpdk/dpdk-17.08/usertools$ sudo ./dpdk-devbind.py -b igb_uio 00:19.0 bensley@ubuntu-laptop:/opt/dpdk/dpdk-17.08/usertools$ sudo ./dpdk-devbind.py --status-dev net Network devices using DPDK-compatible driver ============================================ 0000:00:19.0 '82579LM Gigabit Network Connection 1502' drv=igb_uio unused= bensley@ubuntu-laptop:/opt/dpdk/dpdk-17.08/usertools$ sudo -i root@ubuntu-laptop:~# echo 2048 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages root@ubuntu-laptop:~# grep -i huge /proc/meminfo AnonHugePages: 223232 kB ShmemHugePages: 0 kB HugePages_Total: 2048 HugePages_Free: 2048 HugePages_Rsvd: 0 HugePages_Surp: 0 Hugepagesize: 2048 kB root@ubuntu-laptop:~# mount -t hugetlbfs nodev /mnt/huge root@ubuntu-laptop:~# exit bensley@ubuntu-laptop:/opt/dpdk/dpdk-17.08/usertools$ cd /opt/dpdk/pktgen-3.4.2 bensley@ubuntu-laptop:/opt/dpdk/pktgen-3.4.2$ sudo ./app/x86_64-native-linuxapp-gcc/pktgen -l 1-3 -n 1 -w 00:19.0 -- -P -m 2.0 Copyright (c) <2010-2017>, Intel Corporation. All rights reserved. Powered by DPDK EAL: Detected 4 lcore(s) EAL: Probing VFIO support... EAL: PCI device 0000:00:19.0 on NUMA socket -1 EAL: Invalid NUMA socket, default to 0 EAL: probe driver: 8086:1502 net_e1000_em Lua 5.3.4 Copyright (C) 1994-2017 Lua.org, PUC-Rio Copyright (c) <2010-2017>, Intel Corporation. All rights reserved. Pktgen created by: Keith Wiles -- >>> Powered by DPDK <<< >>> Packet Burst 64, RX Desc 1024, TX Desc 2048, mbufs/port 16384, mbuf cache 2048 === port to lcore mapping table (# lcores 3) === lcore: 1 2 3 Total port 0: ( D: T) ( 1: 1) ( 0: 0) = ( 1: 1) Total : ( 0: 0) ( 1: 1) ( 0: 0) Display and Timer on lcore 1, rx:tx counts per port/lcore Configuring 1 ports, MBUF Size 2176, MBUF Cache Size 2048 Lcore: 2, RX-TX RX_cnt( 1): (pid= 0:qid= 0) TX_cnt( 1): (pid= 0:qid= 0) Port : 0, nb_lcores 1, private 0xac0ea0, lcores: 2 ** Default Info (00:19.0, if_index:0) ** max_vfs : 0, min_rx_bufsize : 256, max_rx_pktlen : 9234 max_rx_queues : 1, max_tx_queues : 1 max_mac_addrs : 5, max_hash_mac_addrs: 0, max_vmdq_pools: 0 rx_offload_capa: 15, tx_offload_capa : 15, reta_size : 0, flow_type_rss_offloads:0000000000000000 vmdq_queue_base: 0, vmdq_queue_num : 0, vmdq_pool_base: 0 ** RX Conf ** pthresh : 0, hthresh : 0, wthresh : 0 Free Thresh : 0, Drop Enable : 0, Deferred Start : 0 ** TX Conf ** pthresh : 0, hthresh : 0, wthresh : 0 Free Thresh : 0, RS Thresh : 0, Deferred Start : 0, TXQ Flags:00000000 Create: Default RX 0:0 - Memory used (MBUFs 16384 x (size 2176 + Hdr 128)) + 192 = 36865 KB headroom 128 2176 Set RX queue stats mapping pid 0, q 0, lcore 2 Create: Default TX 0:0 - Memory used (MBUFs 16384 x (size 2176 + Hdr 128)) + 192 = 36865 KB headroom 128 2176 Create: Range TX 0:0 - Memory used (MBUFs 16384 x (size 2176 + Hdr 128)) + 192 = 36865 KB headroom 128 2176 Create: Sequence TX 0:0 - Memory used (MBUFs 16384 x (size 2176 + Hdr 128)) + 192 = 36865 KB headroom 128 2176 Create: Special TX 0:0 - Memory used (MBUFs 64 x (size 2176 + Hdr 128)) + 192 = 145 KB headroom 128 2176 Port memory used = 147601 KB Initialize Port 0 -- TxQ 1, RxQ 1, Src MAC 3c:97:0e:bd:62:82 Total memory used = 147601 KB Port 0: Link Up - speed 10 Mbps - full-duplex === Display processing on lcore 1 WARNING: Nothing to do on lcore 3: exiting RX/TX processing lcore: 2 rx: 1 tx: 1 For RX found 1 port(s) for lcore 2 For TX found 1 port(s) for lcore 2 \ Ports 0-0 of 1
Copyright (c) <2010-2017>, Intel Corporation Flags:Port : P--------------:0 Link State : ----TotalRate---- Pkts/s Max/Rx : 0/0 0/0 Max/Tx : 0/0 0/0 MBits/s Rx/Tx : 0/0 0/0 Broadcast : 0 Multicast : 0 64 Bytes : 0 65-127 : 0 128-255 : 0 256-511 : 0 512-1023 : 0 1024-1518 : 0 Runts/Jumbos : 0/0 Errors Rx/Tx : 0/0 Total Rx Pkts : 0 Tx Pkts : 0 Rx MBs : 0 Tx MBs : 0 ARP/ICMP Pkts : 0/0 : Pattern Type : abcd... Tx Count/% Rate : Forever /100% PktSize/Tx Burst : 64 / 64 Src/Dest Port : 1234 / 5678 Pkt Type:VLAN ID : IPv4 / TCP:0001 Dst IP Address : 192.168.1.1 Src IP Address : 192.168.0.1/24 Dst MAC Address : 00:00:00:00:00:00 Src MAC Address : 3c:97:0e:bd:62:82 VendID/PCI Addr : 8086:1502/00:25.0 -- Pktgen Ver: 3.4.2 (DPDK 17.08.0) Powered by DPDK -------------------------- ** Version: DPDK 17.08.0, Command Line Interface with timers Pktgen:/> quit