From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 22B85A0C48; Wed, 7 Jul 2021 02:35:24 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 94BF84069E; Wed, 7 Jul 2021 02:35:23 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id 924CB4003C; Wed, 7 Jul 2021 02:35:22 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10037"; a="273063131" X-IronPort-AV: E=Sophos;i="5.83,330,1616482800"; d="scan'208";a="273063131" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jul 2021 17:35:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.83,330,1616482800"; d="scan'208";a="560111035" Received: from fmsmsx605.amr.corp.intel.com ([10.18.126.85]) by orsmga004.jf.intel.com with ESMTP; 06 Jul 2021 17:35:17 -0700 Received: from shsmsx606.ccr.corp.intel.com (10.109.6.216) by fmsmsx605.amr.corp.intel.com (10.18.126.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.4; Tue, 6 Jul 2021 17:35:16 -0700 Received: from shsmsx601.ccr.corp.intel.com (10.109.6.141) by SHSMSX606.ccr.corp.intel.com (10.109.6.216) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.4; Wed, 7 Jul 2021 08:35:15 +0800 Received: from shsmsx601.ccr.corp.intel.com ([10.109.6.141]) by SHSMSX601.ccr.corp.intel.com ([10.109.6.141]) with mapi id 15.01.2242.008; Wed, 7 Jul 2021 08:35:15 +0800 From: "Zhang, Qi Z" To: "Wang, Haiyue" , David Marchand , "dev@dpdk.org" CC: "stable@dpdk.org" , "Yang, Qiming" , "Stillwell Jr, Paul M" Thread-Topic: [PATCH v2] net/ice: fix memzone leak when firmware is missing Thread-Index: AQHXcnE8XtnGixB8kEeOKx1cRhMU/6s1hjwAgAEktnA= Date: Wed, 7 Jul 2021 00:35:14 +0000 Message-ID: <9a8d0a478ab44195b7ecddd17dab19b5@intel.com> References: <20210706085643.5088-1-david.marchand@redhat.com> <20210706141237.30492-1-david.marchand@redhat.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-reaction: no-action dlp-version: 11.5.1.3 dlp-product: dlpe-windows x-originating-ip: [10.239.127.36] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v2] net/ice: fix memzone leak when firmware is missing X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" > -----Original Message----- > From: Wang, Haiyue > Sent: Tuesday, July 6, 2021 11:07 PM > To: David Marchand ; dev@dpdk.org > Cc: stable@dpdk.org; Yang, Qiming ; Zhang, Qi Z > ; Stillwell Jr, Paul M > Subject: RE: [PATCH v2] net/ice: fix memzone leak when firmware is missin= g >=20 > > -----Original Message----- > > From: David Marchand > > Sent: Tuesday, July 6, 2021 22:13 > > To: dev@dpdk.org > > Cc: Wang, Haiyue ; stable@dpdk.org; Yang, > > Qiming ; Zhang, Qi Z ; > > Stillwell Jr, Paul M > > Subject: [PATCH v2] net/ice: fix memzone leak when firmware is missing > > > > Caught by our QE. > > When the firmware is missing, memzones were not released. > > > > $ dpdk-testpmd -c 0x1f -a 0:0:0.0 -- -i ... > > > > testpmd> dump_memzone > > ... > > Zone 6: name:, len:0x15040, virt:0x1661b24c0, > > socket_id:0, > > flags:0 > > physical segments used: > > addr: 0x140000000 iova: 0x140000000 len: 0x40000000 pagesz: > > 0x40000000 > > > > testpmd> port attach 0000:5e:00.0 > > Attaching a new port... > > EAL: Using IOMMU type 1 (Type 1) > > EAL: Probe PCI driver: net_ice (8086:159b) device: 0000:5e:00.0 > > (socket 0) > > ice_load_pkg(): failed to open file: > > /lib/firmware/intel/ice/ddp/ice.pkg > > > > ice_dev_init(): Failed to load the DDP package,Use safe-mode-support=3D= 1 > > to enter Safe Mode > > EAL: Releasing PCI mapped resource for 0000:5e:00.0 > > EAL: Calling pci_unmap_resource for 0000:5e:00.0 at 0x2200000000 > > EAL: Calling pci_unmap_resource for 0000:5e:00.0 at 0x2202000000 > > EAL: Driver cannot attach the device (0000:5e:00.0) > > EAL: Failed to attach device on primary process > > testpmd: Failed to attach port 0000:5e:00.0 > > > > testpmd> dump_memzone > > ... > > Zone 139: name:, len:0x1000, > > virt:0x1660ed800, socket_id:0, flags:0 physical segments used: > > addr: 0x140000000 iova: 0x140000000 len: 0x40000000 pagesz: > > 0x40000000 > > > > With 20 tries attaching a net/ice port, we would end up with: > > > > EAL: Probe PCI driver: net_ice (8086:159b) device: 0000:5e:00.0 > > (socket 0) > > EAL: memzone_reserve_aligned_thread_unsafe(): Number of requested > memzone > > segments exceeds RTE_MAX_MEMZONE > > ice_dev_init(): Failed to initialize HW > > > > Fixes: a4c8c48fe3f4 ("net/ice: load OS default package") > > Cc: stable@dpdk.org > > > > Signed-off-by: David Marchand > > --- > > Changes since v1: > > - switch to ice_deinit_hw() helper, > > - fix build for Windows, > > > > --- > > drivers/net/ice/ice_ethdev.c | 9 +++++---- > > 1 file changed, 5 insertions(+), 4 deletions(-) >=20 > Acked-by: Haiyue Wang Applied to dpdk-next-net-intel. Thanks Qi >=20 > > -- > > 2.23.0 >=20