]> git.droids-corp.org - dpdk.git/commitdiff
net/ice: fix pointer of meta data
authorAlvin Zhang <alvinx.zhang@intel.com>
Fri, 12 Nov 2021 05:34:18 +0000 (13:34 +0800)
committerQi Zhang <qi.z.zhang@intel.com>
Fri, 12 Nov 2021 05:46:36 +0000 (06:46 +0100)
This patch fixes coverity issue by directly passing the address
of the meta data to subfunction.

Coverity issue: 373867
Fixes: 5ad3db8d4bdd ("net/ice: enable advanced RSS")
Cc: stable@dpdk.org
Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
drivers/net/ice/ice_hash.c

index 4b682a4f3573778fffe632f7d93b47d8b4d0d822..afbb357fa35ead1168eb6e9d28788afa705fee3e 100644 (file)
@@ -1055,10 +1055,9 @@ ice_any_invalid_rss_type(enum rte_eth_hash_function rss_func,
 static int
 ice_hash_parse_action(struct ice_pattern_match_item *pattern_match_item,
                const struct rte_flow_action actions[],
-               uint64_t pattern_hint, void **meta,
+               uint64_t pattern_hint, struct ice_rss_meta *rss_meta,
                struct rte_flow_error *error)
 {
-       struct ice_rss_meta *rss_meta = (struct ice_rss_meta *)*meta;
        struct ice_rss_hash_cfg *cfg = pattern_match_item->meta;
        enum rte_flow_action_type action_type;
        const struct rte_flow_action_rss *rss;
@@ -1196,7 +1195,7 @@ ice_hash_parse_pattern_action(__rte_unused struct ice_adapter *ad,
 
        /* Check rss action. */
        ret = ice_hash_parse_action(pattern_match_item, actions, phint,
-                                   (void **)&rss_meta_ptr, error);
+                                   rss_meta_ptr, error);
 
 error:
        if (!ret && meta)