I've followed the Azure guide for getting DPDK installed and TRex does detect them.
/opt/trex/v2.56$ sudo ./dpdk_setup_ports.py -t
+----+------+--------------+-------------------+---------------------------------------------------------------------+-----------+----------+--------+
| ID | NUMA | PCI | MAC | Name | Driver | Linux IF | Active |
+====+======+==============+===================+=====================================================================+===========+==========+========+
| 0 | 0 | 0002:00:02.0 | 00:0d:3a:53:a0:5f | MT27500/MT27520 Family [ConnectX-3/ConnectX-3 Pro Virtual Function] | mlx4_core | enP2p0s2 | |
+----+------+--------------+-------------------+---------------------------------------------------------------------+-----------+----------+--------+
| 1 | 0 | 0003:00:02.0 | 00:0d:3a:53:a7:e8 | MT27500/MT27520 Family [ConnectX-3/ConnectX-3 Pro Virtual Function] | mlx4_core | enP3p0s2 | |
+----+------+--------------+-------------------+---------------------------------------------------------------------+-----------+----------+--------+
Traffic-01:/opt/trex/v2.56$ cat /etc/trex_cfg.yaml
- version: 2
interfaces: ['0002:00:02.0', '0003:00:02.0']
#interfaces: ['eth1', 'eth2']
port_info:
- ip: 10.4.7.5
default_gw: 10.4.7.7
- ip: 10.4.7.7
default_gw: 10.4.7.5
platform:
master_thread_id: 0
latency_thread_id: 7
dual_if:
- socket: 0
threads: [1,2,3,4,5,6]
However when I run TRex I get an error regarding the missing ofed_info binary.
/opt/trex/v2.56$ sudo ./t-rex-64 -f cap2/dns.yaml
Warning: Mellanox NICs where tested only with RedHat/CentOS 7.4
Correct usage with other Linux distributions is not guaranteed.
OFED /usr/bin/ofed_info is not installed on this setup
ERROR encountered while configuring TRex system
I've tried to install MLNX_OFED versions 4.4-2.0.7.0 & 4.5-1.0.1.0 with zero success. Has anyone been able to get this working on Azure with DPDK?
TRex does work if I use eth1 & eth2 but I'm not confident I'm getting full performance.
--
You received this message because you are subscribed to the Google Groups "TRex Traffic Generator" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trex-tgn+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trex-tgn/a81a26d3-0a7a-498e-b71d-78139961f7cd%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "TRex Traffic Generator" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trex-tgn+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trex-tgn/9dbbe1d7-6349-4578-8dc9-803b0ac91cb3%40googlegroups.com.
--
You received this message because you are subscribed to a topic in the Google Groups "TRex Traffic Generator" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/trex-tgn/JVD67FQ6rpY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to trex-tgn+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trex-tgn/2aa8f5c1-17e4-4bed-963d-acc201390575%40googlegroups.com.
Hi Sai,I've added the code but coudn't test ithttps://github.com/hhaim/trex-core/tree/azure(added tun/failsafe/vdev)Could you try this package
wget --no-cache https://trex-tgn.cisco.com/trex/release/v2.62-azure.tar.gz
You can add dpdk extention (ext_dpdk_opt) to the trex_ext.yaml
You received this message because you are subscribed to the Google Groups "TRex Traffic Generator" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trex-tgn+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trex-tgn/CAJJvaspRWPrVAd6p9nB2g6w%3D%3DDn97soD2LYuHnGg0Rqq-SjRSw%40mail.gmail.com.
+Stephen
Stephen asked me to add rdma-core package and check if that works. Will try that now
Regards,
Charan
To view this discussion on the web visit https://groups.google.com/d/msgid/trex-tgn/DM5PR21MB0699513D34A7D640D805EAC999820%40DM5PR21MB0699.namprd21.prod.outlook.com.

Not sure why failsafe would ever send over dtap. It doesn’t have to at all.
$wget --no-cache https://trex-tgn.cisco.com/trex/release/v2.63-azure.tar.gz
Hi Hanoh,
I downloaded v2.63 package but Trex (DPDK app) is unable to resolve Mac for the gateway IP’s provided in the trex config file
Trex bails out with the below failure:
Failed resolving dest MAC for default gateway:10.0.1.5 on port 0
TX ARP request on port 0 - ip: 10.0.1.5 mac: Unknown
TX ARP request on port 1 - ip: 10.0.0.4 mac: Unknown
TX ARP request on port 0 - ip: 10.0.1.5 mac: Unknown
TX ARP request on port 1 - ip: 10.0.0.4 mac: Unknown
Below is the config file:
- version: 2
interfaces: ['a1b0:00:02.0','b43d:00:02.0']
ext_dpdk_opt: ['--vdev=net_vdev_netvsc0,iface=eth1','--vdev=net_vdev_netvsc1,iface=eth2', '-w a1b0:00:02.0', '-w b43d:00:02.0']
port_info:
- ip: 10.0.1.4
default_gw: 10.0.1.5
- ip: 10.0.0.10
default_gw: 10.0.0.4
I have added static routes for the gateways and I am able to traceroute to Gateway IP’s from the VM (The gateway IP’s are on different VM in same VNET):
[Centos-7 v2.63-azure]$ traceroute 10.0.1.5
traceroute to 10.0.1.5 (10.0.1.5), 30 hops max, 60 byte packets
I see EAL error Logs where tap interfaces fail to be created. I want to know if this is the reason or if it’s an issue at all:
net_failsafe: sub_device 1 probe failed (File exists)
eth_dev_tap_create(): Unable to create TAP interface
eth_dev_tap_create(): TAP Unable to initialize net_tap_vsc0
EAL: Driver cannot attach the device (net_tap_vsc0)
EAL: Failed to attach device on primary process
I am on Centos Linux version:
Centos-7 v2.63-azure]$ uname -a
Linux Centos-7.6 5.3.1-1.el7.elrepo.x86_64 #1 SMP Sat Sep 21 09:44:09 EDT 2019 x86_64 x86_64 x86_64 GNU/Linux
To be clear, I have enabled MLX4,MLX5 PMD’s in the dpdk config file (CONFIG_RTE_LIBRTE_MLX4_PMD =y)
Can you help pointing out the problem? The topology is simple with a VM1 ßàVM2 (Each have two Nics with each pair in the same subnet).
Also, it would be great if we can document any caveats for bring up TREX on Azure platform.
Regards,
Charan
From: hanoh haim <hhaim...@gmail.com>
Sent: Thursday, October 3, 2019 11:57 AM
To: Stephen Hemminger <sthe...@microsoft.com>
Cc: Charan Addala <Sai.A...@microsoft.com>; NVA Engineering Team <nva...@microsoft.com>; Sai Subha Charan Addala <sad...@ncsu.edu>; TRex Traffic Generator <trex...@googlegroups.com>; mbum...@cisco.com
Subject: Re: [trex-tgn] Re: Issues Running TRex on Azure
Hi All,
Please try this syntax:
interfaces: ['a1b0:00:02.0','b43d:00:02.0']
ext_dpdk_opt: ['--vdev=net_vdev_netvsc0,iface=eth1','--vdev=net_vdev_netvsc1,iface=eth2']
interfaces_vdevs : ['net_failsafe_vsc0','net_failsafe_vsc1']
Thanks,
-Malcolm
Hi Malcolm,
I have tried the below Trex configuration but still run into the dame issue:
- version: 2
interfaces: ['a1b0:00:02.0','b43d:00:02.0']
ext_dpdk_opt: ['--vdev=net_vdev_netvsc0,iface=eth1','--vdev=net_vdev_netvsc1,iface=eth2']
interfaces_vdevs : ['net_failsafe_vsc0','net_failsafe_vsc1']
port_info:
- ip: 10.0.1.4
default_gw: 10.0.1.5
- ip: 10.0.0.10
default_gw: 10.0.0.4
platform:
master_thread_id: 0
latency_thread_id: 3
dual_if:
- socket: 0
threads: [1,2]
EAL logs after running Trex:
[Centos-7 v2.63-azure]$ sudo ./t-rex-64 -f cap2/http_simple.yaml -c 1 -m 10000 -d 100 --no-flow-control-change
The ports are bound/configured.
Starting TRex v2.62-azure please wait ...
eth_dev_tap_create(): Unable to create TAP interface
eth_dev_tap_create(): TAP Unable to initialize net_tap_vsc0
EAL: Driver cannot attach the device (net_tap_vsc0)
EAL: Failed to attach device on primary process
net_failsafe: sub_device 1 probe failed (File exists)
eth_dev_tap_create(): Unable to create TAP interface
eth_dev_tap_create(): TAP Unable to initialize net_tap_vsc1
EAL: Driver cannot attach the device (net_tap_vsc1)
EAL: Failed to attach device on primary process
net_failsafe: sub_device 1 probe failed (File exists)
eth_dev_tap_create(): Unable to create TAP interface
eth_dev_tap_create(): TAP Unable to initialize net_tap_vsc0
vdev_probe(): failed to initialize net_tap_vsc0 device
eth_dev_tap_create(): Unable to create TAP interface
eth_dev_tap_create(): TAP Unable to initialize net_tap_vsc1
vdev_probe(): failed to initialize net_tap_vsc1 device
EAL: Bus (vdev) probe failed.
set driver name net_mlx4
driver capability : TCP_UDP_OFFLOAD TSO
set dpdk queues mode to ONE_QUE
Number of ports found: 2
zmq publisher at: tcp://*:4500
wait 1 sec .
port : 0
------------
link : link : Link Up - speed 40000 Mbps - full-duplex
promiscuous : 0
port : 1
------------
link : link : Link Up - speed 40000 Mbps - full-duplex
promiscuous : 0
net_failsafe: sub_device 1 probe failed (File exists)
Failed resolving dest MAC for default gateway:10.0.1.5 on port 0
Just more context, I am providing TREX with eth1 and eth2 interfaces, but Accelerated networking is enabled on my eth0 interface also.
[Centos-7 v2.63-azure]$ ip link show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
link/ether 00:0d:3a:fd:f0:24 brd ff:ff:ff:ff:ff:ff
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
link/ether 00:0d:3a:6c:bd:bd brd ff:ff:ff:ff:ff:ff
4: eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
link/ether 00:0d:3a:fd:22:e2 brd ff:ff:ff:ff:ff:ff
5: eth3: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master eth0 state UP mode DEFAULT group default qlen 1000
link/ether 00:0d:3a:fd:f0:24 brd ff:ff:ff:ff:ff:ff
46: eth4: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master eth1 state UP mode DEFAULT group default qlen 1000
link/ether 00:0d:3a:6c:bd:bd brd ff:ff:ff:ff:ff:ff
47: eth5: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master eth2 state UP mode DEFAULT group default qlen 1000
link/ether 00:0d:3a:fd:22:e2 brd ff:ff:ff:ff:ff:ff
Is there anything else I am missing? If you are able to run Trex on Azure VM, can you point me to Guest OS and the kernel version? I have compiled below PMD’s in dpdk apart from default:
CONFIG_RTE_LIBRTE_MLX4_PMD=y
CONFIG_RTE_LIBRTE_MLX5_PMD=y
CONFIG_RTE_LIBRTE_NETVSC_PMD=y
CONFIG_RTE_LIBRTE_VDEV_NETVSC_PMD=y
Regards,
Charan
Mellanox DPDK support does need (and should not use OFED) on kernels 4.14 or later.
1. 10.0.1.5 (10.0.1.5) 2.186 ms 2.181 ms 2.124 ms
Hi Hanoh,
Using the latest 2.64 trex version, we were able to push traffic upto 1Gbps. This was on mlx4 driver (CX-3).
-Global stats enabled
Cpu Utilization : 11.1 % 18.2 Gb/core
Platform_factor : 1.0
Total-Tx : 1.01 Gbps
Total-Rx : 996.32 Mbps
Total-PPS : 295.42 Kpps
Total-CPS : 4.52 Kcps
Expected-PPS : 300.64 Kpps
Expected-CPS : 4.51 Kcps
Expected-BPS : 1.06 Gbps
Active-flows : 2935 Clients : 255 Socket-util : 0.0183 %
Open-flows : 94023 Servers : 65535 Socket : 2935 Socket/Clients : 11.5
drop-rate : 0.00 bps
current time : 21.4 sec
test duration : 28.6 sec
I will now try to run TREX on mlx5 and update if I observe a better traffic rate.
1. 10.0.1.5 (10.0.1.5) 2.186 ms 2.181 ms 2.124 ms