From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wg0-f42.google.com (mail-wg0-f42.google.com [74.125.82.42]) by dpdk.org (Postfix) with ESMTP id 64C40C340 for ; Tue, 14 Apr 2015 18:07:41 +0200 (CEST) Received: by wgsk9 with SMTP id k9so17389583wgs.3 for ; Tue, 14 Apr 2015 09:07:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:references:in-reply-to:subject:date:message-id :mime-version:content-type:content-transfer-encoding:thread-index :content-language; bh=OM0sV0+WcBlBQ/0B8KDWaa/WqR/BMR8kFOwXKxdtjiA=; b=afKUMclaVJuMF00+/YQspL/h7Ba9nADkfy8l3idH4xkE/oQi7YhOpMXr26J5u+9KSY aW5lOukEdWkjU1Ub96QDY8h6HmXjkngES0bKELh04FOiiNJXtSHczdInOh9a8lOP7mcO R9WE5qv0zdh0NCp1rd9rIUutl6Z68ALZJzPD5zTW91682t2HVL5nfRBc/25Zbrpz/aTe 3Dd3pwDY+7ASW0b711dsIJa6+hd+pgkCoTIfxu7D700215PrI/KBx+ovjkBIjozKK5kV YslAQnQHC4qwwUXzLMeRg4ERQJ08xRxJ/yWG1sPEqhAwgdGVuQO8kr5Ty3nqCAP0FPWt u96A== X-Received: by 10.194.171.36 with SMTP id ar4mr40060462wjc.7.1429027661097; Tue, 14 Apr 2015 09:07:41 -0700 (PDT) Received: from laptop1 (84.95.210.61.forward.012.net.il. [84.95.210.61]) by mx.google.com with ESMTPSA id fa8sm3392436wib.14.2015.04.14.09.07.39 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 14 Apr 2015 09:07:40 -0700 (PDT) From: "Raz Amir" To: "'Ouyang, Changchun'" , "'Thomas Monjalon'" References: <1428450303-97954-1-git-send-email-razamir22@gmail.com> <1428927569-98070-1-git-send-email-razamir22@gmail.com> <2279951.2s8DnS74SK@xps13> In-Reply-To: Date: Tue, 14 Apr 2015 19:07:34 +0300 Message-ID: <15dd01d076cd$1f412280$5dc36780$@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 15.0 Thread-Index: AQKh04vm1iLk0SVFuqC8rqR6FNNrlgGWSgDeAbobrEoAzXaJUJuJAp0A Content-Language: en-gb Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH v3] Restore support for virtio on FreeBSD 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 16:07:41 -0000 Thomas, I will add more information to the commit message, but regarding your feedback on the iopl comment, it is called also iopl on FreeBSD. See this link to FreeBSD source code, for the io driver code - the flag name is PSL_IOPL: https://github.com/freebsd/freebsd/blob/master/sys/i386/i386/io.c#L38 Ouyang, I will implement your suggestion in the next patch version I submit. -----Original Message----- From: Ouyang, Changchun [mailto:changchun.ouyang@intel.com] Sent: 14 April 2015 05:33 To: Thomas Monjalon; Raz Amir Cc: dev@dpdk.org; Ouyang, Changchun Subject: RE: [dpdk-dev] [PATCH v3] Restore support for virtio on FreeBSD Hi > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Thomas Monjalon > Sent: Monday, April 13, 2015 8:55 PM > To: Raz Amir > Cc: dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH v3] Restore support for virtio on > FreeBSD > > Please provide more information in the commit message. > We need to know what was the problem (crash) in the git history. > Then when doing git blame, we'll have the full explanation. > > 2015-04-13 15:19, Raz Amir: > > Fixes: 8a312224bcde ("eal/bsd: fix fd leak") > > > > Signed-off-by: Raz Amir > > --- > > lib/librte_eal/bsdapp/eal/eal.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/lib/librte_eal/bsdapp/eal/eal.c > > b/lib/librte_eal/bsdapp/eal/eal.c index 871d5f4..e20f915 100644 > > --- a/lib/librte_eal/bsdapp/eal/eal.c > > +++ b/lib/librte_eal/bsdapp/eal/eal.c > > @@ -426,7 +426,7 @@ rte_eal_iopl_init(void) > > fd = open("/dev/io", O_RDWR); > > if (fd < 0) > > return -1; > > - close(fd); > > + /* keep fd open for iopl */ Copy and paste my comment into this new patch: Would you pls think about this solution? Declare a static var to keep the fd which is opened for freebsd; Then define a deinit function for virtio device, Inside the deinit function, close the fd which was opened in init stage. Done. thanks Changchun