DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Zhang, Qi Z" <qi.z.zhang@intel.com>
To: "Zhao1, Wei" <wei.zhao1@intel.com>, "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] net/i40e: fix issues for RSS flow API
Date: Thu, 25 Jan 2018 05:40:13 +0000	[thread overview]
Message-ID: <039ED4275CED7440929022BC67E7061153133847@SHSMSX103.ccr.corp.intel.com> (raw)
In-Reply-To: <20180123064302.118082-1-wei.zhao1@intel.com>

Hi Wei:
	

> -----Original Message-----
> From: Zhao1, Wei
> Sent: Tuesday, January 23, 2018 2:43 PM
> To: dev@dpdk.org
> Cc: Zhang, Qi Z <qi.z.zhang@intel.com>; Zhao1, Wei <wei.zhao1@intel.com>
> Subject: [PATCH] net/i40e: fix issues for RSS flow API
> 
> This patch fix issues check from DPDK coverity issues.
> 
> Fixes: ecad87d22383e ("net/i40e: move RSS to flow API") Coverity issues:
> 257020 257024 257037
> 
> Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
> ---
>  drivers/net/i40e/i40e_ethdev.c | 2 +-
>  drivers/net/i40e/i40e_flow.c   | 4 ++--
>  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
> index 5ea9f99..b0db458 100644
> --- a/drivers/net/i40e/i40e_ethdev.c
> +++ b/drivers/net/i40e/i40e_ethdev.c
> @@ -11681,7 +11681,7 @@ i40e_config_rss_filter(struct i40e_pf *pf,
>  							sizeof(uint32_t);
>  	}
> 
> -	return i40e_hw_rss_hash_set(pf, &rss_conf);
> +	i40e_hw_rss_hash_set(pf, &rss_conf);
> 
>  	rte_memcpy(rss_info,
>  		conf, sizeof(struct i40e_rte_flow_rss_conf)); diff --git
> a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c index
> cd9a9b6..a23f485 100644
> --- a/drivers/net/i40e/i40e_flow.c
> +++ b/drivers/net/i40e/i40e_flow.c
> @@ -4201,6 +4201,7 @@ i40e_flow_parse_rss_action(struct rte_eth_dev
> *dev,
>  	struct i40e_rte_flow_rss_conf *rss_info = &pf->rss_info;
>  	uint16_t i, j, n, tmp;
>  	uint32_t index = 0;
> +	uint64_t hf_bit = 1;
> 
>  	NEXT_ITEM_OF_ACTION(act, actions, index);
>  	rss = (const struct rte_flow_action_rss *)act->conf; @@ -4219,7
> +4220,7 @@ i40e_flow_parse_rss_action(struct rte_eth_dev *dev,
> 
>  	if (action_flag) {
>  		for (n = 0; n < 64; n++) {
> -			if (rss->rss_conf->rss_hf & (1 << n)) {
> +			if (rss->rss_conf->rss_hf & (hf_bit << n)) {
>  				conf_info->region[0].hw_flowtype[0] = n;
>  				conf_info->region[0].flowtype_num = 1;
>  				conf_info->queue_region_number = 1; @@ -4313,7
> +4314,6 @@ i40e_flow_parse_rss_action(struct rte_eth_dev *dev,
>  		}
> 
>  		rss_config->queue_region_conf = TRUE;
> -		return 0;
>  	}

Seems if you remove return 0, rss_config->queue_region_conf will be overwrite by FALSE at end, right?
> 
>  	if (!rss || !rss->num) {
> --
> 2.9.3

  parent reply	other threads:[~2018-01-25  5:40 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-23  6:43 Wei Zhao
2018-01-25  3:59 ` Zhang, Qi Z
2018-01-25  5:40 ` Zhang, Qi Z [this message]
2018-01-26  3:17   ` Zhao1, Wei
2018-01-26  8:32     ` Zhang, Helin
2018-01-26  8:56       ` Zhao1, Wei
2018-01-25  6:12 ` Zhang, Qi Z
2018-01-25  6:22   ` Zhao1, Wei
2018-01-26  3:08 ` [dpdk-dev] [PATCH v2] net/i40e: fix issue " Wei Zhao
2018-01-26  7:32   ` Zhang, Qi Z
2018-01-26  8:43   ` [dpdk-dev] [PATCH v3] " Wei Zhao
2018-01-26  8:46   ` Wei Zhao
2018-01-30  2:46     ` Zhang, Helin

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=039ED4275CED7440929022BC67E7061153133847@SHSMSX103.ccr.corp.intel.com \
    --to=qi.z.zhang@intel.com \
    --cc=dev@dpdk.org \
    --cc=wei.zhao1@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).