cisco-system-traffic-generator/trex-core

Failed to run the./t-rex-64 command

lizzmosquito opened this issue · 1 comments

1、environment
ubuntu 18.04
Linux SixWind 4.15.18-041518-generic #201804190330 SMP Thu Apr 19 07:34:21 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

2、First failure
root:/home/trex-core-master/scripts# sudo ./t-rex-64 -i
Starting Scapy server...... Scapy server is started
Trying to bind to vfio-pci ...
Trying to bind to try_bind_to_uio_pci_generic ...
/usr/bin/python3 dpdk_nic_bind.py --bind=uio_pci_generic 0000:00:04.0
The ports are bound/configured.
./t-rex-64: line 104: ./_t-rex-64-o: No such file or directory
Killing Scapy server... Scapy server is killed

solution:
Modify t-rex-64 file ,Change _t-rex-64-o to t-rex-64-o

bird_preparation
if grep -q $FLAG /proc/cpuinfo ; then
./_$(basename $0) $INPUT_ARGS $EXTRA_INPUT_ARGS
RESULT=$?
if [ $RESULT -eq 132 ]; then
echo " WARNING this program is optimized for the new Intel processors. "
echo " try the ./t-rex-64-o application that should work for any Intel processor but might be slower. "
echo " try to run t-rex-64-o .. "
./t-rex-64-o $INPUT_ARGS $EXTRA_INPUT_ARGS
RESULT=$?
fi
else
./t-rex-64-o $INPUT_ARGS $EXTRA_INPUT_ARGS
RESULT=$?
fi

exit $RESULT

3、Second failure
root:/home/trex-core-master/scripts# sudo ./t-rex-64 -i
Starting Scapy server...... Scapy server is started
The ports are bound/configured.
Killing Scapy server... Scapy server is killed
Starting Scapy server...... Scapy server is started
The ports are bound/configured.
Killing Scapy server... Scapy server is killed
Starting Scapy server...... Scapy server is started
The ports are bound/configured.
Killing Scapy server... Scapy server is killed
Starting Scapy server...... Scapy server is started
The ports are bound/configured.
Killing Scapy server... Scapy server is killed

How to solve this problem ?

You have to build trex first before using it.
Check the instructions here: https://github.com/cisco-system-traffic-generator/trex-core/wiki#how-to-build-trex