From patchwork Tue Oct 20 10:02:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Conor Walsh X-Patchwork-Id: 81577 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 1C62DA04DD; Tue, 20 Oct 2020 12:03:43 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A6677C938; Tue, 20 Oct 2020 12:03:09 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 7F2C2BCA2; Tue, 20 Oct 2020 12:03:03 +0200 (CEST) IronPort-SDR: c0hNeT82rzRYBIBTE/7VjLsRvbfImDtaARQvCWHNYQIAveM2H+YOV3t+FBRbZiIZ24B70faf/M l2Mru/GkG5sQ== X-IronPort-AV: E=McAfee;i="6000,8403,9779"; a="154127043" X-IronPort-AV: E=Sophos;i="5.77,396,1596524400"; d="scan'208";a="154127043" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Oct 2020 03:03:02 -0700 IronPort-SDR: F11jsM0KSX3dZk6sCCke1hTPQ9Tn1E7mr9QFSM5UG+KIrh2NlWk4H6GEervpIo03vSI6kDaGTO rekyHENjJmxg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,396,1596524400"; d="scan'208";a="347806815" Received: from silpixa00400466.ir.intel.com ([10.237.213.98]) by fmsmga004.fm.intel.com with ESMTP; 20 Oct 2020 03:03:01 -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, stable@dpdk.org Cc: dev@dpdk.org, Conor Walsh Date: Tue, 20 Oct 2020 10:02:48 +0000 Message-Id: <20201020100248.761693-3-conor.walsh@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201020100248.761693-1-conor.walsh@intel.com> References: <20201019122620.749625-1-conor.walsh@intel.com> <20201020100248.761693-1-conor.walsh@intel.com> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v2 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 Acked-by: Haiyue Wang --- 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) {