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 9A91FA48D for ; Fri, 20 Apr 2018 15:18:02 +0200 (CEST) Received: by mail-io0-f195.google.com with SMTP id t123-v6so10511230iof.7 for ; Fri, 20 Apr 2018 06:18:02 -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=ZP9INJphkOi6nSWmsETq+x5B5erCOJdj4uErQY6XW1Y=; b=mUmjoJuomTb81taTUVc1PIanZbBc/fbGXHkIkaKZHFr8yqmstd4QgqyzClPxkoMA/j EvGzrwN/btfqlpAT2wJ9U9U8hWRhId4vsRZIeDxqU2kY4c65fyynDJ76pe96pjKwXVYL kPRuW8NW+Jg+8EbOdachBvCHeVS0ciZCrq92usHWoqMiFUzamfQUmWK6HZJg7KLxt5ND d99yxVgNMmFSl7CTT2d1ccG05zjE0NeutFQzLhcMUrmyiGnoyv0+3i8q8GN/hu1VZC8q VMovVkaXgWmSoKL5iARJ6r3/LtEq4oqzeOentsD246/xaHMHAC3dwGaOQAg/zwaDjR/8 0OxQ== 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=ZP9INJphkOi6nSWmsETq+x5B5erCOJdj4uErQY6XW1Y=; b=tOu1c/glj+5E21c+fY8BTqRMYpegxTvzflv9DLguoOPC2QCVVBSiwqCht76mwh4j6R K7Nb7EQOQB52FED+IzLEghQTVqwxDH7AnEskLCZTsw0pfGcpF2KLyrEM0gFHYwK67efb NKGHjh4c4Ffn94vpYwLB1u2HZ/KG43zz06QAfuUyIZKDmn+blFJuwLrHMLkCZTXDCY9z R70EjpONcpzWmt3qzT3Ks7NqvnDbSAcSo1rQejnhVx4Z6GaPwwneDSs03oGs+PuzcnL9 hE83vYv0mg2M7ngk4hDcLyo81ut5Ltmz5Ytj+aKYWd2sc0a3Hv7KyJWEPIODX4jthhsF X/+w== X-Gm-Message-State: ALQs6tCT5eZOpJkCuPn5fB3tl2CP3oxyMN89GHXglxJ5f+JgPt+QRm1m zUqEFmbgd3Sq9Lyk3Y+IN9XYO5lRk8XWPGswenia6w== X-Google-Smtp-Source: AIpwx4+9z+zJXBh5oNmFtq0RMzygBmdqO2cttHu6ITBy3xIfpGUjvyAXtW6qh/a8zizD73ykjgvRlSoayx1g9JP0+Lw= X-Received: by 2002:a6b:a89b:: with SMTP id e27-v6mr10075707ioj.180.1524230282021; Fri, 20 Apr 2018 06:18:02 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.142.145 with HTTP; Fri, 20 Apr 2018 06:18:01 -0700 (PDT) In-Reply-To: References: <1524117669-25729-1-git-send-email-arnon@qwilt.com> <1524117669-25729-9-git-send-email-arnon@qwilt.com> From: Arnon Warshavsky Date: Fri, 20 Apr 2018 16:18:01 +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 08/11] eal: replace rte_panic instances in interrupts thread 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:18:02 -0000 Not deliberate.Thanks On Thu, Apr 19, 2018 at 8:27 PM, Kevin Traynor wrote: > On 04/19/2018 07:01 AM, Arnon Warshavsky wrote: > > replace panic calls with log and retrun value. > > Thread function removes the noretrun attribute. > > > > Signed-off-by: Arnon Warshavsky > > --- > > lib/librte_eal/linuxapp/eal/eal_interrupts.c | 27 > ++++++++++++++++++++------- > > 1 file changed, 20 insertions(+), 7 deletions(-) > > > > diff --git a/lib/librte_eal/linuxapp/eal/eal_interrupts.c > b/lib/librte_eal/linuxapp/eal/eal_interrupts.c > > index 58e9328..8b8650a 100644 > > --- a/lib/librte_eal/linuxapp/eal/eal_interrupts.c > > +++ b/lib/librte_eal/linuxapp/eal/eal_interrupts.c > > @@ -785,7 +785,7 @@ struct rte_intr_source { > > * @return > > * never return; > > */ > > -static __attribute__((noreturn)) void * > > +static void * > > eal_intr_thread_main(__rte_unused void *arg) > > { > > struct epoll_event ev; > > @@ -803,8 +803,11 @@ static __attribute__((noreturn)) void * > > > > /* create epoll fd */ > > int pfd = epoll_create(1); > > - if (pfd < 0) > > - rte_panic("Cannot create epoll instance\n"); > > + if (pfd < 0) { > > + RTE_LOG(CRIT, EAL, "%s(): Cannot create epoll > instance\n", > > + __func__); > > + return NULL; > > + } > > > > pipe_event.data.fd = intr_pipe.readfd; > > /** > > @@ -813,8 +816,11 @@ static __attribute__((noreturn)) void * > > */ > > if (epoll_ctl(pfd, EPOLL_CTL_ADD, intr_pipe.readfd, > > &pipe_event) < 0) { > > - rte_panic("Error adding fd to %d epoll_ctl, %s\n", > > + RTE_LOG(CRIT, EAL, "%s(): Error adding fd to %d " > > + "epoll_ctl, %s\n", > > + __func__, > > intr_pipe.readfd, strerror(errno)); > > + return NULL; > > } > > numfds++; > > > > @@ -831,9 +837,14 @@ static __attribute__((noreturn)) void * > > * into wait list. > > */ > > if (epoll_ctl(pfd, EPOLL_CTL_ADD, > > - src->intr_handle.fd, &ev) < 0){ > > - rte_panic("Error adding fd %d epoll_ctl, > %s\n", > > - src->intr_handle.fd, > strerror(errno)); > > + src->intr_handle.fd, &ev) < 0) { > > The alignment changed here, not sure if it was deliberate > > > + RTE_LOG(CRIT, EAL, > > + "%s(): Error adding fd %d " > > + "epoll_ctl, %s\n", > > + __func__, > > + src->intr_handle.fd, > > + strerror(errno)); > > + return NULL; > > } > > else > > numfds++; > > @@ -848,6 +859,8 @@ static __attribute__((noreturn)) void * > > */ > > close(pfd); > > } > > + > > + return NULL; > > } > > > > int > > > > -- *Arnon Warshavsky* *Qwilt | work: +972-72-2221634 | mobile: +972-50-8583058 | arnon@qwilt.com *