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 v2 1/2] selftests/xsk: Ensure traffic validation proceeds after ring size adjustment in xskxceiver
Date: Mon, 1 Jul 2024 18:27:44 +0200 [thread overview]
Message-ID: <ZoLZAD/KlgcsrNdy@boxer> (raw)
In-Reply-To: <20240627043548.221724-2-tushar.vyavahare@intel.com>
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@intel.com>
> Reviewed-by: Maciej Fijalkowski <maciej.fijalkowski@intel.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
>
>
next prev parent reply other threads:[~2024-07-01 16:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-27 4:35 [PATCH bpf-next v2 0/2] selftests/xsk: Enhance traffic validation and batch size support Tushar Vyavahare
2024-06-27 4:35 ` [PATCH bpf-next v2 1/2] selftests/xsk: Ensure traffic validation proceeds after ring size adjustment in xskxceiver Tushar Vyavahare
2024-07-01 16:27 ` Maciej Fijalkowski [this message]
2024-06-27 4:35 ` [PATCH bpf-next v2 2/2] selftests/xsk: Enhance batch size support with dynamic configurations Tushar Vyavahare
2024-07-01 16:40 ` Maciej Fijalkowski
2024-07-01 16:28 ` [PATCH bpf-next v2 0/2] selftests/xsk: Enhance traffic validation and batch size support Maciej Fijalkowski
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=ZoLZAD/KlgcsrNdy@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.