From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Qiming Yang <qiming.yang@intel.com>, dev@dpdk.org
Cc: stable@dpdk.org
Subject: Re: [dpdk-dev] [dpdk-stable] [PATCH] app/testpmd: fixed get RSS conf
Date: Fri, 21 Dec 2018 14:25:37 +0000 [thread overview]
Message-ID: <1521f691-6b85-48f4-3f30-b3e1004bdf30@intel.com> (raw)
In-Reply-To: <20181221130145.182446-1-qiming.yang@intel.com>
On 12/21/2018 1:01 PM, Qiming Yang wrote:
> I40e do not allow to get rss hena only, need to get rss
> key meanwhile.
i40e_get_rss_key() returns error if 'rss_conf.rss_key' is NULL, this patch is
fixing the error case.
But instead of fixing this in application level, it can be better to fix in
driver level. Because 'rte_eth_dev_rss_hash_conf_get()' API doesn't dictate
'rss_conf.rss_key' to be not NULL, so any other application can cause same problem.
Possible solution can be to have an interim 'key' buffer in
'i40e_dev_rss_hash_conf_get()' and copy it to 'rss_conf.rss_key' if it is not NULL.
>
> Fixes: 16321de09396 ("ethdev: allow to get RSS hash functions and key")
> Cc: stable@dpdk.org
>
> Signed-off-by: Qiming Yang <qiming.yang@intel.com>
> ---
> app/test-pmd/config.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
> index b9e5dd9..482c4f5 100644
> --- a/app/test-pmd/config.c
> +++ b/app/test-pmd/config.c
> @@ -1764,8 +1764,7 @@ port_rss_hash_conf_show(portid_t port_id, int show_rss_key)
> return;
> }
>
> - /* Get RSS hash key if asked to display it */
> - rss_conf.rss_key = (show_rss_key) ? rss_key : NULL;
> + rss_conf.rss_key = rss_key;
> rss_conf.rss_key_len = hash_key_size;
> diag = rte_eth_dev_rss_hash_conf_get(port_id, &rss_conf);
> if (diag != 0) {
> @@ -1793,6 +1792,8 @@ port_rss_hash_conf_show(portid_t port_id, int show_rss_key)
> printf("%s ", rss_type_table[i].str);
> }
> printf("\n");
> +
> + /* Get RSS hash key if asked to display it */
> if (!show_rss_key)
> return;
> printf("RSS key:\n");
>
next prev parent reply other threads:[~2018-12-21 14:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-21 13:01 [dpdk-dev] " Qiming Yang
2018-12-21 14:25 ` Ferruh Yigit [this message]
2018-12-24 7:26 ` [dpdk-dev] [dpdk-stable] " Yang, Qiming
2018-12-24 15:34 ` [dpdk-dev] [PATCH v2] net/i40e: " Qiming Yang
2018-12-24 12:39 ` Zhang, Qi Z
2018-12-29 9:33 ` [dpdk-dev] [PATCH v3] net/i40e: fix get RSS conf issue Qiming Yang
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=1521f691-6b85-48f4-3f30-b3e1004bdf30@intel.com \
--to=ferruh.yigit@intel.com \
--cc=dev@dpdk.org \
--cc=qiming.yang@intel.com \
--cc=stable@dpdk.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).