From: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
To: Tushar Vyavahare <tushar.vyavahare@intel.com>
Cc: <bpf@vger.kernel.org>, <netdev@vger.kernel.org>,
<bjorn@kernel.org>, <magnus.karlsson@intel.com>,
<jonathan.lemon@gmail.com>, <davem@davemloft.net>,
<kuba@kernel.org>, <pabeni@redhat.com>, <ast@kernel.org>,
<daniel@iogearbox.net>, <tirthendu.sarkar@intel.com>
Subject: Re: [PATCH bpf-next 1/2] selftests/xsk: Ensure traffic validation proceeds after ring size adjustment in xskxceiver
Date: Tue, 25 Jun 2024 19:22:23 +0200 [thread overview]
Message-ID: <Znr8z7zbFb+KD1lq@boxer> (raw)
In-Reply-To: <20240619132048.152830-2-tushar.vyavahare@intel.com>
On Wed, Jun 19, 2024 at 01:20:47PM +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@intel.com>
Reviewed-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
> ---
> 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
>
next prev parent reply other threads:[~2024-06-25 17:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-19 13:20 [PATCH bpf-next 0/2] selftests/xsk: Enhance traffic validation and batch size support Tushar Vyavahare
2024-06-19 13:20 ` [PATCH bpf-next 1/2] selftests/xsk: Ensure traffic validation proceeds after ring size adjustment in xskxceiver Tushar Vyavahare
2024-06-25 17:22 ` Maciej Fijalkowski [this message]
2024-06-19 13:20 ` [PATCH bpf-next 2/2] selftests/xsk: Enhance batch size support with dynamic configurations Tushar Vyavahare
2024-06-25 17:40 ` Maciej Fijalkowski
2024-06-26 8:36 ` Vyavahare, Tushar
2024-06-26 8:51 ` Magnus Karlsson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Znr8z7zbFb+KD1lq@boxer \
--to=maciej.fijalkowski@intel.com \
--cc=ast@kernel.org \
--cc=bjorn@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=jonathan.lemon@gmail.com \
--cc=kuba@kernel.org \
--cc=magnus.karlsson@intel.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=tirthendu.sarkar@intel.com \
--cc=tushar.vyavahare@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.