From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io0-f195.google.com (mail-io0-f195.google.com [209.85.223.195]) by dpdk.org (Postfix) with ESMTP id 4886AF988 for ; Fri, 20 Apr 2018 15:17:25 +0200 (CEST) Received: by mail-io0-f195.google.com with SMTP id d24-v6so650706iob.5 for ; Fri, 20 Apr 2018 06:17:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qwilt-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=HQYSgoqheR5vNnCK9hx8KtoKiq+CU9E0cXMTRYkEgII=; b=ygLc5EWPIuLmz8memPNcEWl2HWLKifrr84eCm2CKWYkIswEhbkLhAkwmmxsdAz6kRv equjYkWZibbJ2fNeKsHTQphV+J051r535qfq9a7o85RlW+tvF5vWX7fnH0fO5GvVISFY 6JASIVw4WJTzlZdpaPMWZ3W3S2Nnc5pl/jsoYC2OoRqWfNlCmuoPxnTKy4q+4rq33SER 243gKNpVctJ8QvHe8BA/nCbtVDxjR4VcqhmklXshJLkps4rirkzUgBofXe4jrzow2mDK jMG5A51KDHjUlOgehsms0KPviAb2B1BCZ/BZyYOiG1Askn/JuVILv/KJG41Ipycauj8O yuvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=HQYSgoqheR5vNnCK9hx8KtoKiq+CU9E0cXMTRYkEgII=; b=jCzXABGjwGHN2kLkKysbLMuyXyYP0KrmOlE16UKr+pQ1a4QIkCiFGiPj6xlGcXCi2l I+fkhypi7x9UVMSXodykzXvkZMGfJCGCBuZzl9LZCosUWyOTkD2eM9TltJZScDbkdD5o 3//ZzdCLt2/bO6DZ1USPVvxlY2pLoFlJUk9oL829t0CbqLgmPG6L2pnp1AW6F3e+eNuj njlgx+EzEE0FwLc6IMnf98DtFxOibBXetwR7ZR/wUgMgbw1rz3oD0NT2G9QfiOLzHpt1 8MjvIYbQAM9Y2iMn36M/6Hg1HqkHhI5oOfyYh/FGs+PRrPR7Ax0HSxhIYX2/7yYql7qi CoWg== X-Gm-Message-State: ALQs6tCPPwcaorxQhtf1H+QJDQ6kHv6yTE1VI9nuOxIHgPI+/B/85RJB +mZ3LYgy/WIqF0y9EDbg2WNmcbp2JWqhBSysas6FXqwS X-Google-Smtp-Source: AIpwx49YU1tTqRA1ZXyovF7824ZF7O5AsSSUjvQavlqHlYT2ky/Ny50Sd4MhbRN7wCQrE3MkpJFf3az23zawy3zLn5Y= X-Received: by 2002:a6b:6918:: with SMTP id e24-v6mr11535917ioc.242.1524230244682; Fri, 20 Apr 2018 06:17:24 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.142.145 with HTTP; Fri, 20 Apr 2018 06:17:24 -0700 (PDT) In-Reply-To: <34c6e1ec-3890-fcee-1c6d-2eb729339d30@redhat.com> References: <1524117669-25729-1-git-send-email-arnon@qwilt.com> <1524117669-25729-6-git-send-email-arnon@qwilt.com> <34c6e1ec-3890-fcee-1c6d-2eb729339d30@redhat.com> From: Arnon Warshavsky Date: Fri, 20 Apr 2018 16:17:24 +0300 Message-ID: To: Kevin Traynor Cc: Thomas Monjalon , "Burakov, Anatoly" , "Lu, Wenzhuo" , "Doherty, Declan" , jerin.jacob@caviumnetworks.com, Bruce Richardson , "Yigit, Ferruh" , dev@dpdk.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH v4 05/11] eal: replace rte_panic instances in eventdev 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: , X-List-Received-Date: Fri, 20 Apr 2018 13:17:25 -0000 Ok. Thanks On Thu, Apr 19, 2018 at 8:26 PM, Kevin Traynor wrote: > On 04/19/2018 07:01 AM, Arnon Warshavsky wrote: > > replace panic calls with log and retrun value. > > > > -- > > v4 - fix split literal strings in log messages > > > > Signed-off-by: Arnon Warshavsky > > --- > > lib/librte_eventdev/rte_eventdev_pmd_pci.h | 8 +++++--- > > lib/librte_eventdev/rte_eventdev_pmd_vdev.h | 8 +++++--- > > 2 files changed, 10 insertions(+), 6 deletions(-) > > > > diff --git a/lib/librte_eventdev/rte_eventdev_pmd_pci.h > b/lib/librte_eventdev/rte_eventdev_pmd_pci.h > > index 8fb6138..dad2182 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 -1; > > return -ENOMEM > > > + } > > } > > > > eventdev->dev = &pci_dev->device; > > diff --git a/lib/librte_eventdev/rte_eventdev_pmd_vdev.h > b/lib/librte_eventdev/rte_eventdev_pmd_vdev.h > > index 8c64a06..b7c08fa 100644 > > --- a/lib/librte_eventdev/rte_eventdev_pmd_vdev.h > > +++ b/lib/librte_eventdev/rte_eventdev_pmd_vdev.h > > @@ -61,9 +61,11 @@ > > RTE_CACHE_LINE_SIZE, > > 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 NULL; > > + } > > } > > > > return eventdev; > > > > -- *Arnon Warshavsky* *Qwilt | work: +972-72-2221634 | mobile: +972-50-8583058 | arnon@qwilt.com *