From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id DA5D2A04A2; Wed, 6 Nov 2019 09:26:32 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2F83D1C026; Wed, 6 Nov 2019 09:26:32 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 77D0F1C025 for ; Wed, 6 Nov 2019 09:26:30 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Nov 2019 00:26:29 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,274,1569308400"; d="scan'208";a="376976833" Received: from npg-dpdk-cvl-simeisu-118d193.sh.intel.com ([10.67.110.183]) by orsmga005.jf.intel.com with ESMTP; 06 Nov 2019 00:26:28 -0800 From: Simei Su To: qi.z.zhang@intel.com, xiaolong.ye@intel.com, qiming.yang@intel.com Cc: dev@dpdk.org, simei.su@intel.com Date: Wed, 6 Nov 2019 16:26:17 +0800 Message-Id: <1573028777-185130-1-git-send-email-simei.su@intel.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1573024135-267218-1-git-send-email-simei.su@intel.com> References: <1573024135-267218-1-git-send-email-simei.su@intel.com> Subject: [dpdk-dev] [PATCH v2] net/ice: fix segmentation fault for RSS init X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" This patch fixes core dump issue when entering safe mode with a wrong package file. This patch also fixes build failure issue. Fixes: 5ad3db8d4bdd ("net/ice: enable advanced RSS") Signed-off-by: Simei Su --- drivers/net/ice/ice_hash.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/ice/ice_hash.c b/drivers/net/ice/ice_hash.c index 3381b45..08b2502 100644 --- a/drivers/net/ice/ice_hash.c +++ b/drivers/net/ice/ice_hash.c @@ -236,12 +236,12 @@ struct ice_hash_match_type ice_hash_type_list[] = { static int ice_hash_init(struct ice_adapter *ad) { - struct ice_flow_parser *parser = NULL; + struct ice_flow_parser *parser; - if (ad->active_pkg_type == ICE_PKG_TYPE_OS_DEFAULT) - parser = &ice_hash_parser_os; - else if (ad->active_pkg_type == ICE_PKG_TYPE_COMMS) + if (ad->active_pkg_type == ICE_PKG_TYPE_COMMS) parser = &ice_hash_parser_comms; + else + parser = &ice_hash_parser_os; return ice_register_parser(parser, ad); } -- 1.8.3.1