From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id AA093A04DC; Mon, 26 Oct 2020 15:54:47 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7FEAE1D9E; Mon, 26 Oct 2020 15:54:46 +0100 (CET) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 6614F100C for ; Mon, 26 Oct 2020 15:54:44 +0100 (CET) IronPort-SDR: gxSdSffotaScXud+/7lgjJbhOmztUfdvIO65rcnkD5Y9qGhP98HHbcVxAnYjPQNGuNgP3LzxMm HqK7pLPM/fvA== X-IronPort-AV: E=McAfee;i="6000,8403,9785"; a="164436040" X-IronPort-AV: E=Sophos;i="5.77,420,1596524400"; d="scan'208";a="164436040" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Oct 2020 07:54:42 -0700 IronPort-SDR: yi+XxJ7eOP2IzmaA94pYDh9HWaafjG/f/VVnK2K18cMQG3XxHjnBM4neJvOShe2nws2K8Hohoj MLs9eVf+Fw9g== X-IronPort-AV: E=Sophos;i="5.77,420,1596524400"; d="scan'208";a="525523673" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.213.225.151]) ([10.213.225.151]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Oct 2020 07:54:41 -0700 To: Jiawen Wu , dev@dpdk.org References: <20201019085415.82207-1-jiawenwu@trustnetic.com> <20201019085415.82207-39-jiawenwu@trustnetic.com> From: Ferruh Yigit Message-ID: <0c32e332-624d-f43c-d59b-172a4ced18af@intel.com> Date: Mon, 26 Oct 2020 14:54:38 +0000 MIME-Version: 1.0 In-Reply-To: <20201019085415.82207-39-jiawenwu@trustnetic.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH v4 38/58] net/txgbe: add PF module init and uninit for SRIOV 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 10/19/2020 9:53 AM, Jiawen Wu wrote: > Add PF module init and uninit operations with mailbox. > > Signed-off-by: Jiawen Wu <...> > +void txgbe_pf_host_init(struct rte_eth_dev *eth_dev) > +{ > + struct txgbe_vf_info **vfinfo = TXGBE_DEV_VFDATA(eth_dev); > + struct txgbe_mirror_info *mirror_info = TXGBE_DEV_MR_INFO(eth_dev); > + struct txgbe_uta_info *uta_info = TXGBE_DEV_UTA_INFO(eth_dev); > + struct txgbe_hw *hw = TXGBE_DEV_HW(eth_dev); > + uint16_t vf_num; > + uint8_t nb_queue; > + > + PMD_INIT_FUNC_TRACE(); > + > + RTE_ETH_DEV_SRIOV(eth_dev).active = 0; > + vf_num = dev_num_vf(eth_dev); > + if (vf_num == 0) > + return; > + > + *vfinfo = rte_zmalloc("vf_info", > + sizeof(struct txgbe_vf_info) * vf_num, 0); > + if (*vfinfo == NULL) > + rte_panic("Cannot allocate memory for private VF data\n"); > + A driver should not exit the application, instead driver should return error and application should decide to exit or not. Can you please replace the 'rte_panic()' with an seperate patch?