DPDK patches and discussions
 help / color / mirror / Atom feed
From: Pavan Nikhilesh Bhagavatula <pbhagavatula@marvell.com>
To: Bruce Richardson <bruce.richardson@intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Cc: Jerin Jacob Kollanukkaran <jerinj@marvell.com>
Subject: RE: [EXT] [PATCH] test/eventdev: avoid configuring port or queue twice
Date: Tue, 7 Nov 2023 17:35:08 +0000	[thread overview]
Message-ID: <PH0PR18MB4086D55D57BAAA9D72A2CB9BDEA9A@PH0PR18MB4086.namprd18.prod.outlook.com> (raw)
In-Reply-To: <20231107163926.55825-1-bruce.richardson@intel.com>


> In the basic sanity tests of eventdev for queue and port setup, queue 0
> was configured separately before running a loop to configure the rest of
> the queues. This loop started from 0, so reconfigured queue 0, and a
> similar reconfiguration happens with port 0 in the later port setup
> test. While most eventdevs should handle this reconfiguration without
> stop/start correctly, it can cause issues, and should be tested
> separately from basic config tests.
> 
> Therefore, adjust loops to start at 1 rather than 0 and avoid
> configuring queue 0 and port 0 twice.
> 
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>

Acked-by: Pavan Nikhilesh <pbhagavatula@marvell.com>

> ---
>  app/test/test_eventdev.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/app/test/test_eventdev.c b/app/test/test_eventdev.c
> index 993e49af3b..71de947ce4 100644
> --- a/app/test/test_eventdev.c
> +++ b/app/test/test_eventdev.c
> @@ -313,7 +313,7 @@ test_eventdev_queue_setup(void)
>  			    RTE_EVENT_DEV_ATTR_QUEUE_COUNT,
> &queue_count),
>  			    "Queue count get failed");
> 
> -	for (i = 0; i < (int)queue_count; i++) {
> +	for (i = 1; i < (int)queue_count; i++) {
>  		ret = rte_event_queue_setup(TEST_DEV_ID, i, NULL);
>  		TEST_ASSERT_SUCCESS(ret, "Failed to setup queue%d", i);
>  	}
> @@ -786,7 +786,7 @@ test_eventdev_port_setup(void)
>  				RTE_EVENT_DEV_ATTR_PORT_COUNT,
>  				&port_count), "Port count get failed");
> 
> -	for (i = 0; i < (int)port_count; i++) {
> +	for (i = 1; i < (int)port_count; i++) {
>  		ret = rte_event_port_setup(TEST_DEV_ID, i, NULL);
>  		TEST_ASSERT_SUCCESS(ret, "Failed to setup port%d", i);
>  	}
> --
> 2.39.2


  reply	other threads:[~2023-11-07 17:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-07 16:39 Bruce Richardson
2023-11-07 17:35 ` Pavan Nikhilesh Bhagavatula [this message]
2023-11-10  7:19   ` [EXT] " Jerin Jacob

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=PH0PR18MB4086D55D57BAAA9D72A2CB9BDEA9A@PH0PR18MB4086.namprd18.prod.outlook.com \
    --to=pbhagavatula@marvell.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=jerinj@marvell.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).