From: "Wu, Jingjing" <jingjing.wu@intel.com>
To: Yuanhan Liu <yliu@fridaylinux.org>, "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH 2/2] testpmd: give more hint on invalid RETA size
Date: Mon, 10 Jul 2017 01:19:06 +0000 [thread overview]
Message-ID: <9BB6961774997848B5B42BEC655768F810DC0E08@SHSMSX103.ccr.corp.intel.com> (raw)
In-Reply-To: <1499407333-1682-2-git-send-email-yliu@fridaylinux.org>
> -----Original Message-----
> From: Yuanhan Liu [mailto:yliu@fridaylinux.org]
> Sent: Friday, July 7, 2017 2:02 PM
> To: dev@dpdk.org
> Cc: Wu, Jingjing <jingjing.wu@intel.com>; Yuanhan Liu <yliu@fridaylinux.org>
> Subject: [PATCH 2/2] testpmd: give more hint on invalid RETA size
>
> Print the valid RTE size range so that user knows what goes wrong.
>
> Signed-off-by: Yuanhan Liu <yliu@fridaylinux.org>
> ---
> app/test-pmd/cmdline.c | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
> index c8faef9..d32a1df 100644
> --- a/app/test-pmd/cmdline.c
> +++ b/app/test-pmd/cmdline.c
> @@ -2140,12 +2140,14 @@ cmd_showport_reta_parsed(void *parsed_result,
> struct cmd_showport_reta *res = parsed_result;
> struct rte_eth_rss_reta_entry64 reta_conf[8];
> struct rte_eth_dev_info dev_info;
> + uint16_t max_reta_size;
>
> memset(&dev_info, 0, sizeof(dev_info));
> rte_eth_dev_info_get(res->port_id, &dev_info);
> - if (dev_info.reta_size == 0 || res->size > dev_info.reta_size ||
> - res->size > ETH_RSS_RETA_SIZE_512) {
> - printf("Invalid redirection table size: %u\n", res->size);
> + max_reta_size = RTE_MIN(dev_info.reta_size, ETH_RSS_RETA_SIZE_512);
> + if (res->size == 0 || res->size > max_reta_size) {
> + printf("Invalid redirection table size: %u (1-%u)\n",
> + res->size, max_reta_size);
> return;
> }
>
Why not merge this with previous one?
Thanks
Jingjing
next prev parent reply other threads:[~2017-07-10 1:19 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-07 6:02 [dpdk-dev] [PATCH 1/2] testpmd: allow to query any " Yuanhan Liu
2017-07-07 6:02 ` [dpdk-dev] [PATCH 2/2] testpmd: give more hint on invalid " Yuanhan Liu
2017-07-10 1:19 ` Wu, Jingjing [this message]
2017-07-10 1:24 ` Yuanhan Liu
2017-07-10 1:17 ` [dpdk-dev] [PATCH 1/2] testpmd: allow to query any " Wu, Jingjing
2017-10-08 4:03 ` 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=9BB6961774997848B5B42BEC655768F810DC0E08@SHSMSX103.ccr.corp.intel.com \
--to=jingjing.wu@intel.com \
--cc=dev@dpdk.org \
--cc=yliu@fridaylinux.org \
/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).