From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 104C9A0C4B for ; Fri, 12 Nov 2021 06:25:50 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 03389410F5; Fri, 12 Nov 2021 06:25:50 +0100 (CET) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id B160240687; Fri, 12 Nov 2021 06:25:47 +0100 (CET) X-IronPort-AV: E=McAfee;i="6200,9189,10165"; a="233020734" X-IronPort-AV: E=Sophos;i="5.87,228,1631602800"; d="scan'208";a="233020734" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Nov 2021 21:25:46 -0800 X-IronPort-AV: E=Sophos;i="5.87,228,1631602800"; d="scan'208";a="565400008" Received: from shwdenpg235.ccr.corp.intel.com ([10.253.106.22]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Nov 2021 21:25:44 -0800 From: Alvin Zhang To: qi.z.zhang@intel.com Cc: dev@dpdk.org, Alvin Zhang , stable@dpdk.org Subject: [PATCH] net/ice: fix pointer of the meta data Date: Fri, 12 Nov 2021 13:25:39 +0800 Message-Id: <20211112052539.21316-1-alvinx.zhang@intel.com> X-Mailer: git-send-email 2.21.0.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org This patch fixes coverity issue by directly passing the address of the meter data to lower function. Coverity issue: 373867 Fixes: 5ad3db8d4bdd ("net/ice: enable advanced RSS") Cc: stable@dpdk.org Signed-off-by: Alvin Zhang --- drivers/net/ice/ice_hash.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/net/ice/ice_hash.c b/drivers/net/ice/ice_hash.c index 4b682a4..afbb357 100644 --- a/drivers/net/ice/ice_hash.c +++ b/drivers/net/ice/ice_hash.c @@ -1055,10 +1055,9 @@ struct rss_attr_type { 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 @@ struct rss_attr_type { /* 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) -- 1.8.3.1