From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id CDB4BFFA for ; Tue, 14 Apr 2015 04:26:39 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP; 13 Apr 2015 19:26:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.11,573,1422950400"; d="scan'208";a="713205133" Received: from pgsmsx107.gar.corp.intel.com ([10.221.44.105]) by orsmga002.jf.intel.com with ESMTP; 13 Apr 2015 19:26:37 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by PGSMSX107.gar.corp.intel.com (10.221.44.105) with Microsoft SMTP Server (TLS) id 14.3.224.2; Tue, 14 Apr 2015 10:25:57 +0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.223]) by SHSMSX151.ccr.corp.intel.com ([10.239.6.50]) with mapi id 14.03.0224.002; Tue, 14 Apr 2015 10:25:56 +0800 From: "Ouyang, Changchun" To: Raz Amir , 'Thomas Monjalon' Thread-Topic: [dpdk-dev] Crash related to virtio NICs in DPDK 2.0.0 on Freebsd 10.1 VM Thread-Index: AQHQchQ+yTbRyDyeNUGcjJOTK7UTXZ1KQ+WAgAAS7gCAAXhP0A== Date: Tue, 14 Apr 2015 02:25:55 +0000 Message-ID: References: <13b901d07149$4e20d430$ea627c90$@gmail.com> <145601d07214$20aa04b0$61fe0e10$@gmail.com> <19871442.I62j3xGbVC@xps13> <156201d075e0$8d5e8390$a81b8ab0$@gmail.com> In-Reply-To: <156201d075e0$8d5e8390$a81b8ab0$@gmail.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] Crash related to virtio NICs in DPDK 2.0.0 on Freebsd 10.1 VM 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: Tue, 14 Apr 2015 02:26:40 -0000 Hi Raz, Thanks for identifying this issue. A comments below. > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Raz Amir > Sent: Monday, April 13, 2015 7:54 PM > To: 'Thomas Monjalon' > Cc: dev@dpdk.org > Subject: Re: [dpdk-dev] Crash related to virtio NICs in DPDK 2.0.0 on Fre= ebsd > 10.1 VM >=20 > Thanks. I will submit a patch When you submit another patch, Would you pls think about this solution? Declare a static var to keep the fd which is opened for freebsd=20 Then define a deinit function for virtio device, Inside the deinit function, close the fd which was opened in init stage. Done. thanks=20 Changchun >=20 > -----Original Message----- > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] > Sent: 13 April 2015 13:46 > To: Raz Amir > Cc: dev@dpdk.org; david.marchand@6wind.com > Subject: Re: Crash related to virtio NICs in DPDK 2.0.0 on Freebsd 10.1 V= M >=20 > 2015-04-08 18:53, Raz Amir: > > The issues happens also in dpdk 1.8.0, and related to patch > > http://dpdk.org/dev/patchwork/patch/239/ > > > > Adding Thomas and David to the thread and I will appreciate your input. > > > > The patch comes to solve a file descriptor leak in the bsdapp version > > of rte_eal_iopl_init after opening the /dev/io device. > > > > Seems like this isn't a file descriptor leak, and it should remain > > open - as I wrote below, I am using virtio. >=20 > Thanks for the bug report. > It seems there was no validation for FreeBSD with virtio. >=20 > > After removing it and testing the crash was resolved. > > > > Any objection for removing the close(fd) that was added at dpdk 1.8.0? >=20 > No, there was a doubt because the man page was not clear. > http://www.freebsd.org/cgi/man.cgi?query=3Dio&sektion=3D4 >=20 > In case you submit a patch, please add this line: > Fixes: 8a312224bcde ("eal/bsd: fix fd leak") >=20 > > Are there scenarios that might be impacted by removing it? >=20 > I don't think so. >=20 > Thanks