From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io0-f170.google.com (mail-io0-f170.google.com [209.85.223.170]) by dpdk.org (Postfix) with ESMTP id 85AA2326D for ; Tue, 24 Apr 2018 08:44:37 +0200 (CEST) Received: by mail-io0-f170.google.com with SMTP id r22-v6so12343070ioc.12 for ; Mon, 23 Apr 2018 23:44:37 -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=dbE/vzFaC4RwV2Ons9+fsxEK/lcxqJRgl5zj6U1noRo=; b=eJkP9p1/AAV6V2jCEbnHsZ6WkTGcPvnqx6ZAMMM74tihZ2P/USm9PnhNFU2tjg5XS+ 4rTJz3LhSQqP+zfsAmC5KgGAnuf7WMkFjBGiD+idoGATRUlfz1ikJ+VVnwhDriGuASrq ix73KJ5R1FTzZpFm6Rbtq7dtmCInVJTcRoiB/ON6IJkQ8Tqkt3JK4IN4VJnBnE32xdUq A21RABLRCi8EL1VMsGLKWUuoBTl8k/Kizodud1pxA5aCG7aT1hamNoxLDTPOvge8iw// TJwHZ8Zy5jAqVicQfaTwz/E+hJCjG+xrq6AxIne+QyicGcbDBKIzPnEW6rA7ivL+AxnL HVFg== 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=dbE/vzFaC4RwV2Ons9+fsxEK/lcxqJRgl5zj6U1noRo=; b=KoePndF05GV2r1V/EmTgjR94ZiyTVuxQuRsOBh/chuzaEgBo8FDkJKj14L8b/+9v+f ze82bTWl86+DVDSJIQS5l+e+ttbf2JKalY8UBo7mu3n2NpwoMWx4yuZ8HlH8WI8liL/Z R11Zug/QNbyB9Ap9A2laArgUELhd+VW/eWLONsNr0ymcxsPSB+vnk19h3wGbOydBV+FS Hc7E72D9Pzow2uJJwoDJPVmgWl/xFrcQLXEaMUZgvWc0ke3lTdLGe8+dDLMqDtakSbmR BYZyfW1BbMHSR1r/vSUGj82DRoREccNoKpnMVVNJpTgZ2yPEOCuUhRP5qNNE2wkX83yH z8Gw== X-Gm-Message-State: ALQs6tBemKR+2Y1CIIeKUbpWIvP7svub/k8Tbq24o439j6/A5UAUwdCO MRxerKI23//PtQ0f2v71pZJBao7ecGeVZUZG1bswNg== X-Google-Smtp-Source: AB8JxZqec7pbhaMHVk0vxzOPKQiIKdVi5eskZcgr8eDKs3ti8VmME8UQfitzlXrjA8FAjIQkP2cEKQHAOhXlLVJelzU= X-Received: by 2002:a6b:a915:: with SMTP id s21-v6mr23040530ioe.8.1524552276603; Mon, 23 Apr 2018 23:44:36 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.142.145 with HTTP; Mon, 23 Apr 2018 23:44:35 -0700 (PDT) In-Reply-To: <1524552123-31378-1-git-send-email-arnon@qwilt.com> References: <1524552123-31378-1-git-send-email-arnon@qwilt.com> From: Arnon Warshavsky Date: Tue, 24 Apr 2018 09:44:35 +0300 Message-ID: To: Thomas Monjalon , "Burakov, Anatoly" , "Lu, Wenzhuo" , "Doherty, Declan" , jerin.jacob@caviumnetworks.com, Bruce Richardson , "Yigit, Ferruh" Cc: dev@dpdk.org, Arnon Warshavsky Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH v6 00/11] al: replace calls to rte_panic and refrain from new instances 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: Tue, 24 Apr 2018 06:44:37 -0000 please ignore this patchset. The v6 formatting is messed up. resending Sorry for the mess On Tue, Apr 24, 2018 at 9:41 AM, Arnon Warshavsky wrote: > The purpose of this patch series is to cleanup the library code > from paths that end up aborting the process, > and move to checking error values, in order to allow the running process > perform an orderly teardown or other mitigation of the event. > > This patch modifies the majority of rte_panic calls > under lib and drivers, and replaces them with a log message > and an error return code according to context, > that can be propagated up the call stack. > > - Focus was given to the dpdk initialization path > - Some of the panic calls within drivers were left in place where > the call is from within an interrupt or calls that are > on the data path,where there is no simple applicative > route to propagate the error to temination. > These should be handled by the driver maintainers.. > - local void functions with no api were changed to retrun a value > where needed > - No change took place in example and test files > - No change took place for debug assertions calling panic > - A new function was added to devtools/checkpatches.sh > in order to prevent new additions of calls to rte_panic > under lib and drivers. > > Keep calm and don't panic > > --- > > v2: > - reformat error messages so that literal string are in the same line > - fix typo in commit message > - add new return code to doxigen of rte_memzone_free() > > v3: > - submit all 13 patches changed and unchanged in the same patchset > > v4: > - remove 2 patches that are no more relevant > - fix split literal string in error message > - change return value -1 to enum > - split value and success code in a static function > > v5: > - reword commit messages > - revert thread related instances back to panicing > - handle file descriptors with state to reset after eal init failure > in case re initialization takes place > > v6: > - Use pmd log macro rather than rte_log > > > > Arnon Warshavsky (11): > crypto/dpaa: replace rte_panic instances in crypto/dpaa driver > bond: replace rte_panic instances in bonding driver > e1000: replace rte_panic instances in e1000 driver > ixgbe: replace rte_panic instances in ixgbe driver > eal: replace rte_panic instances in eventdev > kni: replace rte_panic instances in kni > eal: replace rte_panic instances in hugepage_info > eal: replace rte_panic instances in interrupts thread > eal: replace rte_panic instances in ethdev > eal: replace rte_panic instances in init sequence > devtools: prevent new instances of rte_panic and rte_exit > > devtools/checkpatches.sh | 95 > +++++++++++++++++++++- > drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 8 +- > drivers/crypto/dpaa_sec/dpaa_sec.c | 8 +- > drivers/net/bonding/rte_eth_bond_8023ad.c | 29 ++++--- > drivers/net/bonding/rte_eth_bond_8023ad_private.h | 2 +- > drivers/net/bonding/rte_eth_bond_api.c | 22 +++-- > drivers/net/bonding/rte_eth_bond_pmd.c | 9 ++- > drivers/net/bonding/rte_eth_bond_private.h | 2 +- > drivers/net/e1000/e1000_ethdev.h | 2 +- > drivers/net/e1000/igb_ethdev.c | 4 +- > drivers/net/e1000/igb_pf.c | 15 ++-- > drivers/net/ixgbe/ixgbe_ethdev.c | 6 +- > drivers/net/ixgbe/ixgbe_ethdev.h | 2 +- > drivers/net/ixgbe/ixgbe_pf.c | 15 ++-- > lib/librte_eal/bsdapp/eal/eal.c | 70 +++++++++++----- > lib/librte_eal/linuxapp/eal/eal.c | 97 > +++++++++++++++-------- > lib/librte_eal/linuxapp/eal/eal_hugepage_info.c | 37 ++++++--- > lib/librte_eal/linuxapp/eal/eal_interrupts.c | 25 ++++-- > lib/librte_ether/rte_ethdev.c | 42 +++++++--- > lib/librte_ether/rte_ethdev.h | 4 +- > lib/librte_eventdev/rte_eventdev_pmd_pci.h | 8 +- > lib/librte_eventdev/rte_eventdev_pmd_vdev.h | 8 +- > lib/librte_kni/rte_kni.c | 18 +++-- > lib/librte_kni/rte_kni_fifo.h | 11 ++- > 24 files changed, 396 insertions(+), 143 deletions(-) > > -- > 1.8.3.1 > > -- *Arnon Warshavsky* *Qwilt | work: +972-72-2221634 | mobile: +972-50-8583058 | arnon@qwilt.com *