cisco-system-traffic-generator / trex-core

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

The intel i225 can enable services but cannot receive packets #1024

Open Snailfl opened 1 year ago

Snailfl commented 1 year ago

Hi~ I have changed the code on my device, now it supports i225 electrical port, but it can only send data packets, but cannot receive data packets. My environment is self-loop. The environment is as follows: root@snail:/home/snail/v3.02# cat /etc/trex_cfg.yaml

Config file generated by dpdk_setup_ports.py

Network devices using DPDK-compatible driver

0000:08:00.0 'Ethernet Controller I225-V' drv=uio_pci_generic unused=igc,igb_uio,vfio-pci 0000:09:00.0 'Ethernet Controller I225-V' drv=uio_pci_generic unused=igc,igb_uio,vfio-pci

-Per port stats table ports | 0 | 1

opackets | 196975266 | 0 obytes | 11818516728 | 0 ipackets | 0 | 495 ibytes | 0 | 29700 ierrors | 0 | 196975044 oerrors | 0 | 0 Tx Bw | 1.72 Gbps | 0.00 bps

You can see it's sent 196975266,But no package was received. I added trex_driver_igc.cpp in src/drivers/ and overwrote some virtual functions. I wonder if it's true:

Snailfl commented 1 year ago

continued: int CTRexExtendedDriverBase2500M::configure_rx_filter_rules(CPhyEthIF * _if) { set_rcv_all(_if, false); if ( get_is_stateless() ) { return configure_rx_filter_rules_stateless(_if); } else { return configure_rx_filter_rules_statefull(_if); } return 0; } I wonder if this acceptance rule is the cause? If yes, what should I do?

Snailfl commented 1 year ago

trex_driver_igc.zip

fortitudepub commented 1 year ago

I am recently using I225 with trex, after add igc driver to trex, I also encounter the problem because the default dpdk_nic_bind.py shipped with trex does not support bind to vfio-pci.

after change the device driver to vfio-pci, I can get test passed.

Hope this may help.

hhaim commented 1 year ago

@fortitudepub could you try to work in software mode?

just add --software instead of changing the dpdk filter code

Snailfl commented 4 months ago

@fortitudepub Hello, is it convenient to know how you get it to bind to vfio-pci on ubuntu?