patches for DPDK stable branches
 help / color / mirror / Atom feed
* [PATCH] net/iavf: fix pointer of meter data
@ 2021-11-11  2:49 Alvin Zhang
  2021-11-11  6:31 ` [PATCH v2] " Alvin Zhang
  0 siblings, 1 reply; 5+ messages in thread
From: Alvin Zhang @ 2021-11-11  2:49 UTC (permalink / raw)
  To: qi.z.zhang; +Cc: dev, Alvin Zhang, stable

This patch fixes coverity issue by directly passing the address
of the meter data to subfunction.

Coverity issue: 373858

Fixes: 91f27b2e39ab ("net/iavf: refactor RSS")
Cc: stable@dpdk.org

Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
---
 drivers/net/iavf/iavf_hash.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/net/iavf/iavf_hash.c b/drivers/net/iavf/iavf_hash.c
index 55d8a11..5e0888e 100644
--- a/drivers/net/iavf/iavf_hash.c
+++ b/drivers/net/iavf/iavf_hash.c
@@ -1261,10 +1261,9 @@ struct rss_attr_type {
 static int
 iavf_hash_parse_action(struct iavf_pattern_match_item *match_item,
 		       const struct rte_flow_action actions[],
-		       uint64_t pattern_hint, void **meta,
+		       uint64_t pattern_hint, struct iavf_rss_meta *rss_meta,
 		       struct rte_flow_error *error)
 {
-	struct iavf_rss_meta *rss_meta = (struct iavf_rss_meta *)*meta;
 	struct virtchnl_proto_hdrs *proto_hdrs;
 	enum rte_flow_action_type action_type;
 	const struct rte_flow_action_rss *rss;
@@ -1378,7 +1377,7 @@ struct rss_attr_type {
 		goto error;
 
 	ret = iavf_hash_parse_action(pattern_match_item, actions, phint,
-				     (void **)&rss_meta_ptr, error);
+				     rss_meta_ptr, error);
 
 error:
 	if (!ret && meta)
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v2] net/iavf: fix pointer of meter data
  2021-11-11  2:49 [PATCH] net/iavf: fix pointer of meter data Alvin Zhang
@ 2021-11-11  6:31 ` Alvin Zhang
  2021-11-11 13:12   ` Zhang, Qi Z
  2021-11-11 17:21   ` Ferruh Yigit
  0 siblings, 2 replies; 5+ messages in thread
From: Alvin Zhang @ 2021-11-11  6:31 UTC (permalink / raw)
  To: qi.z.zhang; +Cc: dev, Alvin Zhang, stable

This patch fixes coverity issue by directly passing the address
of the meter data to lower function.

Coverity issue: 373867

Fixes: 91f27b2e39ab ("net/iavf: refactor RSS")
Cc: stable@dpdk.org

Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
---
 drivers/net/iavf/iavf_hash.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/net/iavf/iavf_hash.c b/drivers/net/iavf/iavf_hash.c
index 55d8a11..5e0888e 100644
--- a/drivers/net/iavf/iavf_hash.c
+++ b/drivers/net/iavf/iavf_hash.c
@@ -1261,10 +1261,9 @@ struct rss_attr_type {
 static int
 iavf_hash_parse_action(struct iavf_pattern_match_item *match_item,
 		       const struct rte_flow_action actions[],
-		       uint64_t pattern_hint, void **meta,
+		       uint64_t pattern_hint, struct iavf_rss_meta *rss_meta,
 		       struct rte_flow_error *error)
 {
-	struct iavf_rss_meta *rss_meta = (struct iavf_rss_meta *)*meta;
 	struct virtchnl_proto_hdrs *proto_hdrs;
 	enum rte_flow_action_type action_type;
 	const struct rte_flow_action_rss *rss;
@@ -1378,7 +1377,7 @@ struct rss_attr_type {
 		goto error;
 
 	ret = iavf_hash_parse_action(pattern_match_item, actions, phint,
-				     (void **)&rss_meta_ptr, error);
+				     rss_meta_ptr, error);
 
 error:
 	if (!ret && meta)
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [PATCH v2] net/iavf: fix pointer of meter data
  2021-11-11  6:31 ` [PATCH v2] " Alvin Zhang
@ 2021-11-11 13:12   ` Zhang, Qi Z
  2021-11-11 17:21   ` Ferruh Yigit
  1 sibling, 0 replies; 5+ messages in thread
From: Zhang, Qi Z @ 2021-11-11 13:12 UTC (permalink / raw)
  To: Zhang, AlvinX; +Cc: dev, stable



> -----Original Message-----
> From: Zhang, AlvinX <alvinx.zhang@intel.com>
> Sent: Thursday, November 11, 2021 2:32 PM
> To: Zhang, Qi Z <qi.z.zhang@intel.com>
> Cc: dev@dpdk.org; Zhang, AlvinX <alvinx.zhang@intel.com>; stable@dpdk.org
> Subject: [PATCH v2] net/iavf: fix pointer of meter data

s/meter/meta

> 
> This patch fixes coverity issue by directly passing the address of the meter data
> to lower function.
> 
> Coverity issue: 373867
> 
> Fixes: 91f27b2e39ab ("net/iavf: refactor RSS")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>

Acked-by: Qi Zhang <qi.z.zhang@intel.com>

Applied to dpdk-next-net-intel.

Thanks
Qi


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] net/iavf: fix pointer of meter data
  2021-11-11  6:31 ` [PATCH v2] " Alvin Zhang
  2021-11-11 13:12   ` Zhang, Qi Z
@ 2021-11-11 17:21   ` Ferruh Yigit
  2021-11-11 23:53     ` Zhang, Qi Z
  1 sibling, 1 reply; 5+ messages in thread
From: Ferruh Yigit @ 2021-11-11 17:21 UTC (permalink / raw)
  To: Alvin Zhang, qi.z.zhang; +Cc: dev, stable

On 11/11/2021 6:31 AM, Alvin Zhang wrote:
> This patch fixes coverity issue by directly passing the address
> of the meter data to lower function.
> 
> Coverity issue: 373867
> 
> Fixes: 91f27b2e39ab ("net/iavf: refactor RSS")

As far as I can see fixed commit is:
Fixes: 7be10c3004be ("net/iavf: add RSS configuration for VF")

I will update in the next-net, can you please double check?

> Cc: stable@dpdk.org
> 
> Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
> ---
>   drivers/net/iavf/iavf_hash.c | 5 ++---
>   1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/iavf/iavf_hash.c b/drivers/net/iavf/iavf_hash.c
> index 55d8a11..5e0888e 100644
> --- a/drivers/net/iavf/iavf_hash.c
> +++ b/drivers/net/iavf/iavf_hash.c
> @@ -1261,10 +1261,9 @@ struct rss_attr_type {
>   static int
>   iavf_hash_parse_action(struct iavf_pattern_match_item *match_item,
>   		       const struct rte_flow_action actions[],
> -		       uint64_t pattern_hint, void **meta,
> +		       uint64_t pattern_hint, struct iavf_rss_meta *rss_meta,
>   		       struct rte_flow_error *error)
>   {
> -	struct iavf_rss_meta *rss_meta = (struct iavf_rss_meta *)*meta;
>   	struct virtchnl_proto_hdrs *proto_hdrs;
>   	enum rte_flow_action_type action_type;
>   	const struct rte_flow_action_rss *rss;
> @@ -1378,7 +1377,7 @@ struct rss_attr_type {
>   		goto error;
>   
>   	ret = iavf_hash_parse_action(pattern_match_item, actions, phint,
> -				     (void **)&rss_meta_ptr, error);
> +				     rss_meta_ptr, error);
>   
>   error:
>   	if (!ret && meta)
> 


^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [PATCH v2] net/iavf: fix pointer of meter data
  2021-11-11 17:21   ` Ferruh Yigit
@ 2021-11-11 23:53     ` Zhang, Qi Z
  0 siblings, 0 replies; 5+ messages in thread
From: Zhang, Qi Z @ 2021-11-11 23:53 UTC (permalink / raw)
  To: Yigit, Ferruh, Zhang, AlvinX; +Cc: dev, stable



> -----Original Message-----
> From: Yigit, Ferruh <ferruh.yigit@intel.com>
> Sent: Friday, November 12, 2021 1:21 AM
> To: Zhang, AlvinX <alvinx.zhang@intel.com>; Zhang, Qi Z
> <qi.z.zhang@intel.com>
> Cc: dev@dpdk.org; stable@dpdk.org
> Subject: Re: [PATCH v2] net/iavf: fix pointer of meter data
> 
> On 11/11/2021 6:31 AM, Alvin Zhang wrote:
> > This patch fixes coverity issue by directly passing the address of the
> > meter data to lower function.
> >
> > Coverity issue: 373867
> >
> > Fixes: 91f27b2e39ab ("net/iavf: refactor RSS")
> 
> As far as I can see fixed commit is:
> Fixes: 7be10c3004be ("net/iavf: add RSS configuration for VF")

+1,this should be the patch that bring the issue, thanks.

> 
> I will update in the next-net, can you please double check?
> 
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
> > ---
> >   drivers/net/iavf/iavf_hash.c | 5 ++---
> >   1 file changed, 2 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/net/iavf/iavf_hash.c
> > b/drivers/net/iavf/iavf_hash.c index 55d8a11..5e0888e 100644
> > --- a/drivers/net/iavf/iavf_hash.c
> > +++ b/drivers/net/iavf/iavf_hash.c
> > @@ -1261,10 +1261,9 @@ struct rss_attr_type {
> >   static int
> >   iavf_hash_parse_action(struct iavf_pattern_match_item *match_item,
> >   		       const struct rte_flow_action actions[],
> > -		       uint64_t pattern_hint, void **meta,
> > +		       uint64_t pattern_hint, struct iavf_rss_meta *rss_meta,
> >   		       struct rte_flow_error *error)
> >   {
> > -	struct iavf_rss_meta *rss_meta = (struct iavf_rss_meta *)*meta;
> >   	struct virtchnl_proto_hdrs *proto_hdrs;
> >   	enum rte_flow_action_type action_type;
> >   	const struct rte_flow_action_rss *rss; @@ -1378,7 +1377,7 @@ struct
> > rss_attr_type {
> >   		goto error;
> >
> >   	ret = iavf_hash_parse_action(pattern_match_item, actions, phint,
> > -				     (void **)&rss_meta_ptr, error);
> > +				     rss_meta_ptr, error);
> >
> >   error:
> >   	if (!ret && meta)
> >


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-11-11 23:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-11  2:49 [PATCH] net/iavf: fix pointer of meter data Alvin Zhang
2021-11-11  6:31 ` [PATCH v2] " Alvin Zhang
2021-11-11 13:12   ` Zhang, Qi Z
2021-11-11 17:21   ` Ferruh Yigit
2021-11-11 23:53     ` Zhang, Qi Z

patches for DPDK stable branches

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.dpdk.org/stable/0 stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ http://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.stable


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git