net/iavf: fix pointer of meter data
PATCH 1/1 net/iavf: fix pointer of meter data
This patch fixes coverity issue by directly passing the address of the meter data to subfunction.
Coverity issue: 373858
--- drivers/net/iavf/iavf_hash.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/net/iavf/iavf_hash.c +2 -3
@@ -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)
Signature · 1 line
1.8.3.1
PATCH v2 1/1 net/iavf: fix pointer of meter data
This patch fixes coverity issue by directly passing the address of the meter data to lower function.
Coverity issue: 373867
--- drivers/net/iavf/iavf_hash.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/net/iavf/iavf_hash.c +2 -3
@@ -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)
Signature · 1 line
1.8.3.1
Quoted 8 lines
-----Original Message-----
From: Zhang, AlvinX <[email protected]>
Sent: Thursday, November 11, 2021 2:32 PM
To: Zhang, Qi Z <[email protected]>
Cc: [email protected]; Zhang, AlvinX <[email protected]>; [email protected]
Subject: [PATCH v2] net/iavf: fix pointer of meter data
s/meter/meta
Quoted 10 lines
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")Signed-off-by Alvin Zhang <[email protected]>
Applied to dpdk-next-net-intel.
Thanks
Qi
Quoted 6 lines · Alvin Zhang
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:
I will update in the next-net, can you please double check?
Quoted 33 lines
Signed-off-by Alvin Zhang <[email protected]>--- drivers/net/iavf/iavf_hash.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)drivers/net/iavf/iavf_hash.c +2
-3@@ -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)
Quoted 14 lines
-----Original Message-----
From: Yigit, Ferruh <[email protected]>
Sent: Friday, November 12, 2021 1:21 AM
To: Zhang, AlvinX <[email protected]>; Zhang, Qi Z <[email protected]>
Cc: [email protected]; [email protected]
Subject: Re: [PATCH v2] net/iavf: fix pointer of meter dataQuoted 3 lines · Alvin Zhang
This patch fixes coverity issue by directly passing the address of the meter data to lower function.
Quoted 6 lines
Quoted 3 lines
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.
Quoted 36 lines
I will update in the next-net, can you please double check?
Quoted 33 lines
Signed-off-by Alvin Zhang <[email protected]>--- drivers/net/iavf/iavf_hash.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)(quoted diff) +0
-0
b/drivers/net/iavf/iavf_hash.cindex 55d8a11..5e0888e 100644drivers/net/iavf/iavf_hash.c +1
-2@@ -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,
drivers/net/iavf/iavf_hash.c +1
-1- (void **)&rss_meta_ptr, error); + rss_meta_ptr, error); error:if (!ret && meta)