[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZoLZAD/KlgcsrNdy@boxer>
Date: Mon, 1 Jul 2024 18:27:44 +0200
From: Maciej Fijalkowski <maciej.fijalkowski@...el.com>
To: Tushar Vyavahare <tushar.vyavahare@...el.com>
CC: <bpf@...r.kernel.org>, <netdev@...r.kernel.org>, <bjorn@...nel.org>,
<magnus.karlsson@...el.com>, <jonathan.lemon@...il.com>,
<davem@...emloft.net>, <kuba@...nel.org>, <pabeni@...hat.com>,
<ast@...nel.org>, <daniel@...earbox.net>, <tirthendu.sarkar@...el.com>
Subject: Re: [PATCH bpf-next v2 1/2] selftests/xsk: Ensure traffic validation
proceeds after ring size adjustment in xskxceiver
On Thu, Jun 27, 2024 at 04:35:47AM +0000, Tushar Vyavahare wrote:
> 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: Tushar Vyavahare <tushar.vyavahare@...el.com>
> Reviewed-by: Maciej Fijalkowski <maciej.fijalkowski@...el.com>
Nit: your SOB should go as last tag
>
> ---
> tools/testing/selftests/bpf/xskxceiver.c | 14 +++++++++-----
> 1 file changed, 9 insertions(+), 5 deletions(-)
>
> diff --git a/tools/testing/selftests/bpf/xskxceiver.c b/tools/testing/selftests/bpf/xskxceiver.c
> index 2eac0895b0a1..088df53869e8 100644
> --- a/tools/testing/selftests/bpf/xskxceiver.c
> +++ b/tools/testing/selftests/bpf/xskxceiver.c
> @@ -1899,11 +1899,15 @@ static int testapp_validate_traffic(struct test_spec *test)
> }
>
> if (test->set_ring) {
> - if (ifobj_tx->hw_ring_size_supp)
> - return set_ring_size(ifobj_tx);
> -
> - ksft_test_result_skip("Changing HW ring size not supported.\n");
> - return TEST_SKIP;
> + if (ifobj_tx->hw_ring_size_supp) {
> + if (set_ring_size(ifobj_tx)) {
> + ksft_test_result_skip("Failed to change HW ring size.\n");
> + return TEST_FAILURE;
> + }
> + } else {
> + ksft_test_result_skip("Changing HW ring size not supported.\n");
> + return TEST_SKIP;
> + }
> }
>
> xsk_attach_xdp_progs(test, ifobj_rx, ifobj_tx);
> --
> 2.34.1
>
>
Powered by blists - more mailing lists