From: David Marchand <david.marchand@redhat.com>
To: Chenxu Di <chenxux.di@intel.com>
Cc: dev <dev@dpdk.org>, Beilei Xing <beilei.xing@intel.com>,
Wenzhuo Lu <wenzhuo.lu@intel.com>
Subject: Re: [dpdk-dev] [PATCH] app/testpmd: fix display issue in flow query
Date: Mon, 13 Jul 2020 10:16:26 +0200 [thread overview]
Message-ID: <CAJFAV8wGD9OhOeshohbuECVWovmvTJCtQXkKEd96RUicREYqsg@mail.gmail.com> (raw)
In-Reply-To: <20200713062842.49166-1-chenxux.di@intel.com>
On Mon, Jul 13, 2020 at 8:39 AM Chenxu Di <chenxux.di@intel.com> wrote:
>
> This patch fix the error line break in the display info of flow query
>
> Fixes: bdb1d61690f7 ("app/testpmd: support RSS config in flow query")
>
> Signed-off-by: Chenxu Di <chenxux.di@intel.com>
> ---
> app/test-pmd/config.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
> index fcbe6b6f7..7b254e484 100644
> --- a/app/test-pmd/config.c
> +++ b/app/test-pmd/config.c
> @@ -1425,7 +1425,10 @@ rss_config_display(struct rte_flow_action_rss *rss_conf)
> if (rss_conf->queue_num == 0)
> printf("none\n");
> for (i = 0; i < rss_conf->queue_num; i++)
> - printf("%d\n", rss_conf->queue[i]);
> + if (i == rss_conf->queue_num - 1)
> + printf("%d\n", rss_conf->queue[i]);
> + else
> + printf("%d ", rss_conf->queue[i]);
>
> printf(" function: ");
> switch (rss_conf->func) {
> --
> 2.17.1
>
What do you think of this (untested) alternative?
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index fcbe6b6f74..30bee33248 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -1421,11 +1421,12 @@ rss_config_display(struct rte_flow_action_rss *rss_conf)
}
printf("RSS:\n"
- " queues: ");
+ " queues:");
if (rss_conf->queue_num == 0)
- printf("none\n");
+ printf(" none");
for (i = 0; i < rss_conf->queue_num; i++)
- printf("%d\n", rss_conf->queue[i]);
+ printf(" %d", rss_conf->queue[i]);
+ printf("\n");
printf(" function: ");
switch (rss_conf->func) {
--
David Marchand
next prev parent reply other threads:[~2020-07-13 8:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-13 6:28 Chenxu Di
2020-07-13 8:16 ` David Marchand [this message]
2020-07-13 8:23 ` Di, ChenxuX
2020-07-14 1:37 ` [dpdk-dev] [PATCH v2] app/testpmd: fix incorrect output format " Chenxu Di
2020-07-14 10:06 ` Phil Yang
2020-07-14 11:38 ` Ferruh Yigit
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=CAJFAV8wGD9OhOeshohbuECVWovmvTJCtQXkKEd96RUicREYqsg@mail.gmail.com \
--to=david.marchand@redhat.com \
--cc=beilei.xing@intel.com \
--cc=chenxux.di@intel.com \
--cc=dev@dpdk.org \
--cc=wenzhuo.lu@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 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).