-
Notifications
You must be signed in to change notification settings - Fork 120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Packets sent by pktgen are all dropped #288
Comments
Please try the fixes-for-release branch and see if that helps. The main branch is older and I have been working on fixes in this new branch. |
I will try the fixes-for-release branch. |
One more suggestion please change -m [3-4].0 to -m [3:4].0 this makes sure you have one RX and one TX core running. |
If TRex also drops the packets it means something else is the problem and Pktgen is not the problem. It could be the NIC is dropping the packets thinking they are invalid or malicious packets. A malicious packet could be it has the same source address MAC as the NIC or many other reasons. Not sure how Wireshark worked?? |
So pktgen is installed on server A and I am using tcpdump or wireshark on server B when pktgen starts running I mention the destination mac address by using the |
BTW, if you get a build error when doing This seems like a DPDK driver problem, but please contact the maintainers from the MAINTAINERS file in DPDK. To me it may not be a driver problem. When TRex and Pktgen being used sees the problem but wireshark and tcpdump are ok as wireshark and tcpdump are using the lInux kernel driver and DPDK is a PMD driver from DPDK. |
@KeithWiles my line rate is set to 100%, but I am only transmitting 18mpps, I tweaked the configurations and got it to go from 13mpps to 18mpps. Is there any way I can bump it to 149mpps? |
Most likely 18mpps is the limitation of the single code used to transmit the packets. Without more details on hardware and configuration I would suspect the issue is you only have one core assigned to transmit packets. You can assign more cores to the TX side and that should improve your performance. But many factors can limit the performance of your system i.e., PCIe bandwidth, limited cores, NIC performance, PMD performance, limited number of RX/TX queues per port, core to PCIe mapping (NUMA related performance) ... |
Hardware Configuration: NIC: Mellanox ConnectX-5 with 100 Gbps capability. EAL Parameters: Pktgen Settings in Console: Disabled hyper-threading and ensured only physical cores are used. |
What is the CPU layout? You can use the DPDK script to dump the layout. What NUMA node is the NIC/PCI attached to? 0000:04:00.1 seems to suggest NIC is on NUMA node 0 and the PCI also. |
So the CPU layout is as follows: cores = [0, 1, 2, 3, 4, 8, 9, 10, 11, 12]
Core 0 [0, 20] [10, 30] And the NUMA node is 0 |
You have 10 physical cores on each CPU. For DPDK polling design you can't use Hyperthread 0 and 1 at the same time. Each physical core has two LCORES Hyperthread 0 and 1. When running DPDK polling threads on HT-0 it will consume 80-90% of the physical core, which leaves HT-1 on that core getting only 10-20% utilization. Because of this we should not use two LCORES (HyperThreads) on the same Physical core. This means to your system configuration you have 10 Physical cores on CPU 0 (NUMA 0). I would use Let me know if you get better performance. |
@KeithWiles I will try this out and can I generate HTTP(S) or DNS traffic? |
The only way to generate those types of packets is to use pcap file with the type of traffic you want. |
@KeithWiles I tried this |
Sorry, I have no suggestions as to why the performance is low here. We setup the cores, NUMA and NICs correctly I believe. It is possible the driver has a problem or the NIC or something else. Sorry I am not able to debug the problem. |
@KeithWiles Thank you for your support! I will try to look into the issue. |
@KeithWiles couple of questions, can I send pcap file to generate https traffic over a single core or on multiple cores, which works accurately? Can cross traffic or noise be generated using pktgen by running two instances of pktgen? |
Pktgen does not contain a TCP/IP stack. When using a PCAP file it is not possible to simulate a TCP connection except at a very basic level list noting a SYN/ACK or other very simple packets. You can run two instances for Pktgen on the same machine, but you need to make sure you split up memory, cores and NICs for each instance. I use this method sometimes to test Pktgen on the same machine. Look in the ccfg directory for two configurations pktgen-1.cfg and pktgen-2.cfg but you will have to update the files for your system. |
Hello, good day to you. I wanted any advice or input that I can get on this issue that I am trying to debug from past one week.
System Setup:
DPDK Version: 23.11.2
Pktgen Version: 24.07.1
Operating System: Linux 5.4.0-192-generic
CPU: Intel Xeon E5-2640 v4 @ 2.40GHz
Mellanox NICs: ConnectX-5 (MT27800 Family), using mlx5_core driver
Driver Bindings: Mellanox NICs are bound to mlx5_core.
Packet Capture: Performed with Wireshark on an identical server.
My goal was to send traffic from one server to another.
I was able to build Pktgen without any issues.
I am able to run the Pktgen from usr/local/bin with appropriate command line arguments.
I set the destination mac address when Pktgen started running and entering the command start all started sending traffic and on the other server at first I used tcp-dump to capture the packets.
What I observed was that the amount of packets being transmitted = the amount of packets being dropped.
Then I used Wireshark to capture packets and Wireshark capture statistics:
Packets Captured: 16,044,383
Packets Displayed: 16,044,383
Dropped Packets: Unknown (Wireshark unable to capture this detail).
I followed this link to tune my NICs:
[https://fasterdata.es.net/host-tuning/linux/]
Command used to run Pktgen:
sudo ./usr/local/bin/pktgen -l 2-4 -n 4 --proc-type auto --log-level 7 --file-prefix pg -a 0000:04:00.1 -- -v -T -P -m [3-4].0 -f themes/black-yellow.theme
After the above command ran without any errors below are a bunch of commands I used to run when Pktgen started running
set 0 dst mac [MAC_ADDRESS]
set 0 size 512
set 0 rate 10
set 0 proto udp
I am unable to identify the root cause of this issue as to why this is happening when all the settings and configurations are set correctly.
Any help or further insights or suggestions to troubleshoot and resolve this issue would be greatly appreciated.
The text was updated successfully, but these errors were encountered: