-
Notifications
You must be signed in to change notification settings - Fork 111
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
seltests/xsk: various improvements to xskxceiver #5669
Commits on Sep 14, 2023
-
Kernel Patches Daemon committed
Sep 14, 2023 Configuration menu - View commit details
-
Copy full SHA for cbb1dbc - Browse repository at this point
Copy the full SHA cbb1dbcView commit details -
selftests/xsk: print per packet info in verbose mode
Print info about every packet in verbose mode, both for Tx and Rx. This is useful to have when a test fails or to validate that a test is really doing what it was designed to do. Info on what is supposed to be received and sent is also printed for the custom packet streams since they differ from the base line. Here is an example: Tx addr: 37e0 len: 64 options: 0 pkt_nb: 8 Tx addr: 4000 len: 64 options: 0 pkt_nb: 9 Rx: addr: 100 len: 64 options: 0 pkt_nb: 0 valid: 1 Rx: addr: 1100 len: 64 options: 0 pkt_nb: 1 valid: 1 Rx: addr: 2100 len: 64 options: 0 pkt_nb: 4 valid: 1 Rx: addr: 3100 len: 64 options: 0 pkt_nb: 8 valid: 1 Rx: addr: 4100 len: 64 options: 0 pkt_nb: 9 valid: 1 One pointless verbose print statement is also deleted and another one is made clearer. Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com>
Configuration menu - View commit details
-
Copy full SHA for 999bad8 - Browse repository at this point
Copy the full SHA 999bad8View commit details -
selftests/xsk: add timeout for Tx thread
Add a timeout for the transmission thread. If packets are not completed properly, for some reason, the test harness would previously get stuck forever in a while loop. But with this patch, this timeout will trigger, flag the test as a failure, and continue with the next test. Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com>
Configuration menu - View commit details
-
Copy full SHA for 7dcdc10 - Browse repository at this point
Copy the full SHA 7dcdc10View commit details -
selftests/xsk: add option to only run tests in a single mode
Add an option -m on the command line that allows the user to run the tests in a single mode instead of all of them. Valid modes are skb, drv, and zc (zero-copy). An example: To run test suite in drv mode only: ./test_xsk.sh -m drv Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com>
Configuration menu - View commit details
-
Copy full SHA for c0e4c44 - Browse repository at this point
Copy the full SHA c0e4c44View commit details -
selftests/xsk: move all tests to separate functions
Prepare for the capability to be able to run a single test by moving all the tests to their own functions. This function can then be called to execute that test in the next commit. Also, the tests named RUN_TO_COMPLETION_* were not named well, so change them to SEND_RECEIVE_* as it is just a basic send and receive test of 4K packets. Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com>
Configuration menu - View commit details
-
Copy full SHA for ed009d7 - Browse repository at this point
Copy the full SHA ed009d7View commit details -
selftests/xsk: declare test names in struct
Declare the test names statically in a struct so that we can refer to them when adding the support to execute a single test in the next commit. Before this patch, the names of them were not declared in a single place which made it not possible to refer to them. Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com>
Configuration menu - View commit details
-
Copy full SHA for cf1f480 - Browse repository at this point
Copy the full SHA cf1f480View commit details -
selftests/xsk: add option that lists all tests
Add a command line option (-l) that lists all the tests. The number before the test will be used in the next commit for specifying a single test to run. Here is an example of the output: Tests: 0: SEND_RECEIVE 1: SEND_RECEIVE_2K_FRAME 2: SEND_RECEIVE_SINGLE_PKT 3: POLL_RX 4: POLL_TX 5: POLL_RXQ_FULL 6: POLL_TXQ_FULL 7: SEND_RECEIVE_UNALIGNED : : Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com>
Configuration menu - View commit details
-
Copy full SHA for c563a45 - Browse repository at this point
Copy the full SHA c563a45View commit details -
selftests/xsk: add option to run single test
Add a command line option to be able to run a single test. This option (-t) takes a number from the list of tests available with the "-l" option. Here are two examples: Run test number 2, the "receive single packet" test in all available modes: ./test_xsk.sh -t 2 Run test number 21, the metadata copy test in skb mode only ./test_xsh.sh -t 21 -m skb Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com>
Configuration menu - View commit details
-
Copy full SHA for 8b2881a - Browse repository at this point
Copy the full SHA 8b2881aView commit details -
selftests/xsk: use ksft_print_msg uniformly
Use ksft_print_msg() instead of printf() and fprintf() in all places as the ksefltests framework is being used. There is only one exception and that is for the list-of-tests print out option, since no tests are run in that case. Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com>
Configuration menu - View commit details
-
Copy full SHA for 2461c87 - Browse repository at this point
Copy the full SHA 2461c87View commit details -
selftests/xsk: fail single test instead of all tests
In a number of places at en error, exit_with_error() is called that terminates the whole test suite. This is not always desirable as it would be more logical to only fail that test and then go along with the other ones. So change this in a number of places in which I thought it would be more logical to just fail the test in question. Examples of this are in code that is only used by a single test. Also delete a pointless if-statement in receive_pkts() that has an exit_with_error() in it. It can never occur since the return value is an unsigned and the test is for less than zero. Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com>
Configuration menu - View commit details
-
Copy full SHA for 45367a4 - Browse repository at this point
Copy the full SHA 45367a4View commit details -
selftests/xsk: display command line options with -h
Add the -h option to display all available command line options available for test_xsk.sh and xskxceiver. Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com>
Configuration menu - View commit details
-
Copy full SHA for 5d64e08 - Browse repository at this point
Copy the full SHA 5d64e08View commit details