From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-we0-f177.google.com (mail-we0-f177.google.com [74.125.82.177]) by dpdk.org (Postfix) with ESMTP id CB908B3E5 for ; Thu, 25 Sep 2014 12:11:41 +0200 (CEST) Received: by mail-we0-f177.google.com with SMTP id t60so7661358wes.22 for ; Thu, 25 Sep 2014 03:17:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=r1wLtTA/2i/3adTro2rzTmvDUVW4ovQalcjhUGG9M8Y=; b=BWXMFoq5WATqB48kxcTaDgBt+wyzyx/FsJBZoffKPfM3S2tXO0Zi6Oth5whaUvyRGm cWRNZ059uoDVYm+JT8u68QyvxigZGC8ToCasv26QF8c+gm0vf11UxAHaHuXMPnDigA/g Zv/JNJaSRNdFCGt7rNjHs4eOBhHZRBtQ3mBiC2L8R4Hj9MDLnhK+Hts4fdgzHCQWNdgo P4NLC9xMA1Ak1fDQdo3gMiGXyj2a8hgXbw0LqMjNIBimimKEI6DO3woFfr5q9QcLuAZW YySzj0TJMSSZGdoXZAhkiAGKf+uvHVrgJuVzP3V1TQ9zJONXGm1dlh1AuwExslK6HVfs vx+g== X-Gm-Message-State: ALoCoQnQ2VDo9RXdZysPeFKcArn2CuFK6c1Y5zNq8pfZ4KsulSfXDkU0pULHCfkGvDTiwJF+Prrj X-Received: by 10.180.99.34 with SMTP id en2mr38255015wib.34.1411640278919; Thu, 25 Sep 2014 03:17:58 -0700 (PDT) Received: from xps13.localnet (136-92-190-109.dsl.ovh.fr. [109.190.92.136]) by mx.google.com with ESMTPSA id pn5sm2214830wjc.4.2014.09.25.03.17.57 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Sep 2014 03:17:58 -0700 (PDT) From: Thomas Monjalon To: dev@dpdk.org Date: Thu, 25 Sep 2014 12:17:49 +0200 Message-ID: <2401333.1lgWLEPGnW@xps13> Organization: 6WIND User-Agent: KMail/4.13.3 (Linux/3.15.8-1-ARCH; KDE/4.13.3; x86_64; ; ) In-Reply-To: <1409062300-17004-2-git-send-email-david.marchand@6wind.com> References: <1409062300-17004-1-git-send-email-david.marchand@6wind.com> <1409062300-17004-2-git-send-email-david.marchand@6wind.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH RFC 1/3] eal/bsd: fix fd leak 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: Thu, 25 Sep 2014 10:11:41 -0000 Hi, Is there any BSD users available to test this patch? I'd like to add this comment in the log: ---- "The initial implementation simply raised the IOPL of the current thread when open(2) was called on the device. This behaviour is retained in the current implementation as legacy support for both i386 and amd64." http://www.freebsd.org/cgi/man.cgi?query=io&sektion=4 Nothing prevents from closing it just after. ---- But it should be tested with virtio to check iopl permissions. Thanks -- Thomas 2014-08-26 16:11, David Marchand: > Signed-off-by: David Marchand > --- > lib/librte_eal/bsdapp/eal/eal.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/lib/librte_eal/bsdapp/eal/eal.c b/lib/librte_eal/bsdapp/eal/eal.c > index a296da5..0697b05 100644 > --- a/lib/librte_eal/bsdapp/eal/eal.c > +++ b/lib/librte_eal/bsdapp/eal/eal.c > @@ -810,6 +810,7 @@ rte_eal_iopl_init(void) > fd = open("/dev/io", O_RDWR); > if (fd < 0) > return -1; > + close(fd); > return 0; > }