From patchwork Mon Oct 19 12:26:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Conor Walsh X-Patchwork-Id: 81361 X-Patchwork-Delegate: qi.z.zhang@intel.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 71ACAA04DC; Mon, 19 Oct 2020 14:27:14 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 32B4EC9A8; Mon, 19 Oct 2020 14:26:40 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 54C59C95A for ; Mon, 19 Oct 2020 14:26:35 +0200 (CEST) IronPort-SDR: V25xcp47EsNw2KEpByVSaul0yTbJ/fJlNc1DBJ29iOhfpM8UVvOvwrjPhR5BD8x0w9S/Ypwcv0 x9KwF9qigt4g== X-IronPort-AV: E=McAfee;i="6000,8403,9778"; a="153955284" X-IronPort-AV: E=Sophos;i="5.77,394,1596524400"; d="scan'208";a="153955284" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Oct 2020 05:26:30 -0700 IronPort-SDR: QMHpi+lNC/bEMuH29AkrGu+18SRN3+vZdLUwLhHL9JFV1nwM6Mp2WSC/LVRCnyAbGak9XxBVDT GjW1wuGALwgg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,394,1596524400"; d="scan'208";a="352963488" Received: from silpixa00400466.ir.intel.com ([10.237.213.98]) by fmsmga002.fm.intel.com with ESMTP; 19 Oct 2020 05:26:29 -0700 From: Conor Walsh To: jia.guo@intel.com, haiyue.wang@intel.com, ferruh.yigit@intel.com, mohammad.abdul.awal@intel.com, declan.doherty@intel.com Cc: dev@dpdk.org, Conor Walsh Date: Mon, 19 Oct 2020 12:26:20 +0000 Message-Id: <20201019122620.749625-3-conor.walsh@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201019122620.749625-1-conor.walsh@intel.com> References: <20201019122620.749625-1-conor.walsh@intel.com> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH 2/2] net/ixgbe: remove rte_panic 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" Remove the usage of rte_panic() within ixgbe_pf_host_init() Signed-off-by: Conor Walsh --- drivers/net/ixgbe/ixgbe_pf.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/net/ixgbe/ixgbe_pf.c b/drivers/net/ixgbe/ixgbe_pf.c index 4e25b1e72e..833863af5a 100644 --- a/drivers/net/ixgbe/ixgbe_pf.c +++ b/drivers/net/ixgbe/ixgbe_pf.c @@ -88,8 +88,11 @@ int ixgbe_pf_host_init(struct rte_eth_dev *eth_dev) return ret; *vfinfo = rte_zmalloc("vf_info", sizeof(struct ixgbe_vf_info) * vf_num, 0); - if (*vfinfo == NULL) - rte_panic("Cannot allocate memory for private VF data\n"); + if (*vfinfo == NULL) { + PMD_INIT_LOG(ERR, + "Cannot allocate memory for private VF data"); + return -ENOMEM; + } ret = rte_eth_switch_domain_alloc(&(*vfinfo)->switch_domain_id); if (ret) {