cisco-system-traffic-generator / trex-core

trex-core site
https://trex-tgn.cisco.com/
Other
1.31k stars 462 forks source link

drop rate equals tx rate, why? #765

Open utszcrystal opened 3 years ago

utszcrystal commented 3 years ago

image I start trex, and use trex-stateless-gui to send packets, but appear the case that the image show. but I use trex-stateless-gui to send icmp packet by service mode, it is ok. can who help me?

bdollma commented 3 years ago

Because the packets sent by TRex are not received in another TRex port.

Snailfl commented 1 year ago

因为TRex发送的数据包在另一个TRex端口没有收到。 Hi,bdollma: Do you mean that the other port did not receive the packet, so it did not reply to this port? Now I have a scenario where two devices are directly connected by network cable and /etc/trex_cfg.yaml is configured in pci mode. Then the NIC is transferred from the kernel to dpdk. I find that I send packets on this port and rx is always 0, resulting in a packet loss rate of 100%.

bdollma commented 1 year ago

try and connect trex ports 0 and 1 with cable in loopback mode and see if it is 0?

Snailfl commented 1 year ago

尝试在环回模式下用电缆连接 trex 端口 0 和 1,看看它是否为 0? Hi,bdollma: You mean loopback on a device? Is the network cable directly connected to two network cards on a device, and then using pci?

Snailfl commented 1 year ago

try and connect trex ports 0 and 1 with cable in loopback mode and see if it is 0? Hi,bdollma: pci loopback seems to be problematic, as follows: root@snail:/home/snail/v2.87# cat /etc/trex_cfg.yaml

Config file generated by dpdk_setup_ports.py

root@snail:/home/snail/v2.87#

root@snail:/home/snail/v2.87# ./t-rex-64 -i Killing Scapy server... Scapy server is killed Starting Scapy server..... Scapy server is started Trying to bind to igb_uio ... /usr/bin/python3 dpdk_nic_bind.py --bind=igb_uio 0000:0a:00.1 /home/snail/v2.87/dpdk_nic_bind.py:40: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives from distutils.util import strtobool Error: bind failed for 0000:0a:00.1 - Cannot write new PCI ID to driver igb_uio Unable to bind interfaces to driver igb_uio. ERROR encountered while configuring TRex system root@snail:/home/snail/v2.87#

Snailfl commented 1 year ago

root@snail:/home/snail/v2.87# ./dpdk_setup_ports.py -s

Network devices using DPDK-compatible driver

0000:0a:00.0 'Ethernet Connection X553 10 GbE SFP+' drv=igb_uio unused=ixgbe,vfio-pci,uio_pci_generic

Network devices using kernel driver

0000:02:00.0 'Ethernet Controller I225-V' if=enp2s0 drv=igc unused=igb_uio,vfio-pci,uio_pci_generic Active 0000:03:00.0 'Ethernet Controller I225-V' if=enp3s0 drv=igc unused=igb_uio,vfio-pci,uio_pci_generic 0000:06:00.0 'Ethernet Controller I225-V' if=enp6s0 drv=igc unused=igb_uio,vfio-pci,uio_pci_generic 0000:07:00.0 'Ethernet Controller I225-V' if=enp7s0 drv=igc unused=igb_uio,vfio-pci,uio_pci_generic 0000:08:00.0 'Ethernet Controller I225-V' if=enp8s0 drv=igc unused=igb_uio,vfio-pci,uio_pci_generic 0000:09:00.0 'Ethernet Controller I225-V' if=enp9s0 drv=igc unused=igb_uio,vfio-pci,uio_pci_generic

Other network devices

0000:0a:00.1 'Ethernet Connection X553 10 GbE SFP+' unused=ixgbe,igb_uio,vfio-pci,uio_pci_generic

bdollma commented 1 year ago

are you using two different TRex machines? In this machine you have only TX port? If this is the case then drop is OK.

Snailfl commented 1 year ago

Hi,bdollma Does trex support use on two different devices? If yes, how do I do it? In addition, as shown in the figure above, I configured two ports in the trex configuration file, both of which used pci, but failed to bind idb_uio.ko to the second port when the service was started. Is there a competition relationship between drivers? Because if you configure only one pci port, it is ok