Commit d80d61ab authored by Tushar Vyavahare's avatar Tushar Vyavahare Committed by Daniel Borkmann

selftests/xsk: Ensure traffic validation proceeds after ring size adjustment in xskxceiver

Previously, HW_SW_MIN_RING_SIZE and HW_SW_MAX_RING_SIZE test cases were
not validating Tx/Rx traffic at all due to early return after changing HW
ring size in testapp_validate_traffic().

Fix the flow by checking return value of set_ring_size() and act upon it
rather than terminating the test case there.
Signed-off-by: default avatarTushar Vyavahare <tushar.vyavahare@intel.com>
Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
Reviewed-by: default avatarMaciej Fijalkowski <maciej.fijalkowski@intel.com>
Link: https://lore.kernel.org/bpf/20240702055916.48071-2-tushar.vyavahare@intel.com
parent 03922e97
...@@ -1899,11 +1899,15 @@ static int testapp_validate_traffic(struct test_spec *test) ...@@ -1899,11 +1899,15 @@ static int testapp_validate_traffic(struct test_spec *test)
} }
if (test->set_ring) { if (test->set_ring) {
if (ifobj_tx->hw_ring_size_supp) if (ifobj_tx->hw_ring_size_supp) {
return set_ring_size(ifobj_tx); if (set_ring_size(ifobj_tx)) {
ksft_test_result_skip("Failed to change HW ring size.\n");
ksft_test_result_skip("Changing HW ring size not supported.\n"); return TEST_FAILURE;
return TEST_SKIP; }
} else {
ksft_test_result_skip("Changing HW ring size not supported.\n");
return TEST_SKIP;
}
} }
xsk_attach_xdp_progs(test, ifobj_rx, ifobj_tx); xsk_attach_xdp_progs(test, ifobj_rx, ifobj_tx);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment