From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 9C6E52B84 for ; Fri, 16 Sep 2016 09:28:07 +0200 (CEST) Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1517A8B13C; Fri, 16 Sep 2016 07:18:08 +0000 (UTC) Received: from sopuli.koti.laiskiainen.org (vpn1-5-186.ams2.redhat.com [10.36.5.186]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u8G7I09w012202; Fri, 16 Sep 2016 03:18:01 -0400 To: Thomas Monjalon , "Hunt, David" , Shreyansh Jain References: <1451682326-5834-1-git-send-email-viktorin@rehivetech.com> <1473410639-10367-13-git-send-email-shreyansh.jain@nxp.com> <1378dc00-7fa7-6679-1118-5992cfd1adfd@intel.com> <4310538.hvdbegMmPc@xps13> Cc: dev@dpdk.org, viktorin@rehivetech.com, hemant.agrawal@nxp.com From: Panu Matilainen Message-ID: <62054083-94c6-d85d-3ab7-71c547117ccb@redhat.com> Date: Fri, 16 Sep 2016 10:17:28 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <4310538.hvdbegMmPc@xps13> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Fri, 16 Sep 2016 07:18:12 +0000 (UTC) Subject: Re: [dpdk-dev] [PATCH v3 12/15] ether: extract function eth_dev_get_intr_handle X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Sep 2016 07:28:07 -0000 On 09/15/2016 05:05 PM, Thomas Monjalon wrote: > 2016-09-15 14:02, Hunt, David: >> On 9/9/2016 9:43 AM, Shreyansh Jain wrote: >>> +static inline >>> +struct rte_intr_handle *eth_dev_get_intr_handle(struct rte_eth_dev *dev) >>> +{ >>> + if (dev->pci_dev) { >>> + return &dev->pci_dev->intr_handle; >>> + } >>> + >>> + RTE_VERIFY(0); >> >> Rather than RTE_VERIFY(0), might I suggest using rte_panic with a more >> relevant error message? > > RTE_ASSERT is preferred. > We must stop adding some rte_panic calls except for debug. +1 It wouldn't hurt to make that a hard rule. - Panu -