-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Keith Wiles <keith.wiles@intel.com>
- Loading branch information
1 parent
957c10c
commit bf32ae8
Showing
4 changed files
with
61 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
description = 'A Pktgen default simple configuration' | ||
|
||
# Setup configuration | ||
setup = { | ||
'exec': ( | ||
'sudo', '-E' | ||
), | ||
|
||
'devices': ( | ||
'03:00.0', | ||
'03:00.1', | ||
), | ||
# UIO module type, igb_uio, vfio-pci or uio_pci_generic | ||
'uio': 'vfio-pci' | ||
} | ||
|
||
# Run command and options | ||
run = { | ||
'exec': ('sudo', '-E'), | ||
|
||
# Application name and use app_path to help locate the app | ||
'app_name': 'pktgen', | ||
|
||
# using (sdk) or (target) for specific variables | ||
# add (app_name) of the application | ||
# Each path is tested for the application | ||
'app_path': ( | ||
'./usr/local/bin/%(app_name)s', | ||
'/usr/local/bin/%(app_name)s' | ||
), | ||
|
||
'cores': '1,2-4,5-7', | ||
'nrank': '4', | ||
'proc': 'auto', | ||
'log': '7', | ||
'prefix': 'pg', | ||
|
||
'allowlist': ( | ||
'03:00.0', | ||
'03:00.1', | ||
), | ||
|
||
'opts': ( | ||
'-v', | ||
'-T', | ||
'-P', | ||
'-G', | ||
#'-j', | ||
), | ||
'map': ( | ||
'[2:3-4].0', | ||
'[5:6-7].1', | ||
), | ||
|
||
'theme': 'themes/black-yellow.theme', | ||
'loadfile': 'cnet-fwd' | ||
} |
bf32ae8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Keith,
Thanks for the fix. But in our test, if a large packet size is configured, e.g., range 0 size 1024 1024 1024 0, the pktgen still doesn't work.
bf32ae8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In what way does it not work? The size does not get set or what?
bf32ae8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I didn't mention the issue clearly. On our intel cascade lake server, if more than 8 cores are used by pktgen to transmit the traffic in range mode with large packet size e.g. 1024, pktgen only sends a few packet then stops as shown by below image. Packet size 64 and 256 can work well.
pktgen start and run command:
./pktgen -l 24-41 -a af:00.0 -- -m "[25-32:33-41].0" -P
range 0 size 1024 1024 1024 0
enable 0 range
start 0
If 8 cores or less are used by pktgen to transmit the traffic, then all packet sizes can work well in range mode.
bf32ae8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the non-range mode (single) work at all sizes?
bf32ae8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, non-range mode work at all sizes.
bf32ae8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just noticed the screen shot above has the same source and destination MAC address (for single mode packets) that can cause the NIC to think someone is spoofing packets. Please change the destination address to something else.
Also please look at the range packets they maybe the same way, using the
page range
command to see the range packet setup. This maybe the error message you are seeing.bf32ae8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the response. Changed the destination mac address to something else, but this didn't help. The "page range" looks good with expected ip dst range.
bf32ae8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From my testing it looks like any packet size greater then 99 bytes is dropped by the NIC even in single packet mode and counted as an error. Maybe the checksums are wrong, will continue looking at the problem. It also seems to count Rx packets as error, but I have not verified the size is the trigger for the error on Rx side.
bf32ae8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found the problem the MTU size was set at MIN size :-(
Please checkout the latest version 24.07.0 and let me know if this fixes the problem
bf32ae8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested latest version 24.07.0. I still saw the same issue I mentioned at the begining. If more than 8 cores are used by pktgen to transmit the traffic in range mode with large packet size e.g. 1024, pktgen only sends a few packet then stops.
bf32ae8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most likely this problem is related to the total number of mbufs created as each thread will consume a number of mbufs from the single mbuf pool. We can try to increase the number of mbufs to see if that fixes the problem.
In file app/pktgen-constants.h DEFAULT_MBUFS_PER_PORT_MULTIPLIER we can try increasing the number to 10. You can also try reducing the number of cores and determine when it start working again.
bf32ae8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right. Changed DEFAULT_MBUFS_PER_PORT_MULTIPLIER to 10, the issue is improved. Pktgen now can use more than 8 cores to transmit the traffic in range mode with large packet size e.g. 1024 bytes. Thanks.