DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas.monjalon@6wind.com>
To: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH RFC 1/3] eal/bsd: fix fd leak
Date: Thu, 25 Sep 2014 12:17:49 +0200	[thread overview]
Message-ID: <2401333.1lgWLEPGnW@xps13> (raw)
In-Reply-To: <1409062300-17004-2-git-send-email-david.marchand@6wind.com>

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 <david.marchand@6wind.com>
> ---
>  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;
>  }

  reply	other threads:[~2014-09-25 10:11 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-26 14:11 [dpdk-dev] [PATCH RFC 0/3] only call iopl when necessary David Marchand
2014-08-26 14:11 ` [dpdk-dev] [PATCH RFC 1/3] eal/bsd: fix fd leak David Marchand
2014-09-25 10:17   ` Thomas Monjalon [this message]
2014-08-26 14:11 ` [dpdk-dev] [PATCH RFC 2/3] eal: don't call rte_eal_iopl_init unconditionnally David Marchand
2014-08-27 17:26   ` Xie, Huawei
2014-08-26 14:11 ` [dpdk-dev] [PATCH RFC 3/3] eal: remove unused flags field David Marchand
2014-08-27  9:22 ` [dpdk-dev] [PATCH RFC 0/3] only call iopl when necessary Xie, Huawei
2014-08-27  9:34   ` David Marchand
2014-08-27  9:57     ` Xie, Huawei
2014-08-27 10:04       ` David Marchand
2014-08-27 10:09         ` Xie, Huawei
2014-08-27 10:24           ` Thomas Monjalon
2014-08-27 21:22   ` Patel, Rashmin N
2014-08-27 22:12     ` Stephen Hemminger
2014-09-29 12:44 ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2401333.1lgWLEPGnW@xps13 \
    --to=thomas.monjalon@6wind.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).