net/iavf: fix pointer of meter data

Message ID 20211111024943.7612-1-alvinx.zhang@intel.com (mailing list archive)
State Superseded, archived
Headers
Series net/iavf: fix pointer of meter data |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/github-robot: build success github build: passed
ci/iol-broadcom-Functional success Functional Testing PASS
ci/intel-Testing success Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-intel-Performance success Performance Testing PASS

Commit Message

Alvin Zhang Nov. 11, 2021, 2:49 a.m. UTC
  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(-)
  

Patch

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)