From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [PATCH v6 05/11] eal: replace rte_panic instances in eventdev Date: Tue, 24 Apr 2018 08:04:49 -0700 Message-ID: <20180424080449.0478c7b4@xeon-e3> References: <1524552123-31378-1-git-send-email-arnon@qwilt.com> <1524552123-31378-6-git-send-email-arnon@qwilt.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: thomas@monjalon.net, anatoly.burakov@intel.com, wenzhuo.lu@intel.com, declan.doherty@intel.com, jerin.jacob@caviumnetworks.com, bruce.richardson@intel.com, ferruh.yigit@intel.com, dev@dpdk.org To: Arnon Warshavsky Return-path: Received: from mail-pg0-f67.google.com (mail-pg0-f67.google.com [74.125.83.67]) by dpdk.org (Postfix) with ESMTP id 14ED94F93 for ; Tue, 24 Apr 2018 17:04:52 +0200 (CEST) Received: by mail-pg0-f67.google.com with SMTP id p10so11085059pgn.1 for ; Tue, 24 Apr 2018 08:04:52 -0700 (PDT) In-Reply-To: <1524552123-31378-6-git-send-email-arnon@qwilt.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Tue, 24 Apr 2018 09:41:57 +0300 Arnon Warshavsky wrote: > diff --git a/lib/librte_eventdev/rte_eventdev_pmd_pci.h b/lib/librte_eventdev/rte_eventdev_pmd_pci.h > index 8fb6138..6e08705 100644 > --- a/lib/librte_eventdev/rte_eventdev_pmd_pci.h > +++ b/lib/librte_eventdev/rte_eventdev_pmd_pci.h > @@ -66,9 +66,11 @@ > RTE_CACHE_LINE_SIZE, > rte_socket_id()); > > - if (eventdev->data->dev_private == NULL) > - rte_panic("Cannot allocate memzone for private " > - "device data"); > + if (eventdev->data->dev_private == NULL) { > + RTE_LOG(CRIT, EAL, "%s(): Cannot allocate memzone for private device data", > + __func__); > + return -ENOMEM; > + } > Off topic, why is the probe function inline in a .h file. This is wasteful, and not at all performance critical. it should be in the .c file.