]> git.droids-corp.org - dpdk.git/commitdiff
net/iavf: fix pointer of meta data
authorAlvin Zhang <alvinx.zhang@intel.com>
Thu, 11 Nov 2021 06:31:47 +0000 (14:31 +0800)
committerQi Zhang <qi.z.zhang@intel.com>
Thu, 11 Nov 2021 13:13:53 +0000 (14:13 +0100)
This patch fixes coverity issue by directly passing the address
of the meta data to lower function.

Coverity issue: 373867
Fixes: 7be10c3004be ("net/iavf: add RSS configuration for VF")
Cc: stable@dpdk.org
Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
drivers/net/iavf/iavf_hash.c

index 55d8a11da388f636bd9fb89295aaa66722c5c889..5e0888ea68c701f20c680003858718151158fe51 100644 (file)
@@ -1261,10 +1261,9 @@ iavf_any_invalid_rss_type(enum rte_eth_hash_function rss_func,
 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 @@ iavf_hash_parse_pattern_action(__rte_unused struct iavf_adapter *ad,
                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)