Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 Jul 2004 15:36:40 +0200
From:      thefly <thefly@acaro.org>
To:        Don Bowman <don@sandvine.com>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: ZEROCOPY between kernel and userland
Message-ID:  <20040706133640.GB5922@tyler>
In-Reply-To: <FE045D4D9F7AED4CBFF1B3B813C85337051D920B@mail.sandvine.com>
References:  <FE045D4D9F7AED4CBFF1B3B813C85337051D920B@mail.sandvine.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--AhhlLboLdkugWU4S
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

could you point me pls to some code of that? To me read-only access is
ok, userspace doesn't need to write anything on it, kernelspace does.
But what about locking issues between userspace read access and
kernelspace write access?



On Tue, Jul 06, 2004 at 09:22:39AM -0400, Don Bowman wrote:
> From: thefly [mailto:thefly@acaro.org]
> > Hello everybody, i'm writing a netgraph module to get some stats about
> > the network traffic. Actually i have to pass all the data gathered all
> > in one piece, to the process which asks me for it. The client should
> > work like this in userland:
> >=20
> > 	int * pointer;
> >=20
> > 	ioctl(dev, MY_COMMAND, pointer);
> >=20
> > after this pointer points to the right memory area. The array=20
> > to pass is
> > about 500Kb, so copying with copyout() would be too expensive, moving
> > the array from kernel's addrespace to process's address space would be
> > fast.=20
> > The question is: what's the actual API to do that, if there's any, in
> > freebsd 5?
>=20
> We did a device, and 'mmap' some shared memory between the two.
> The user space has read-only access.
>=20
>=20
>=20

--=20
    Claudio "thefly" Martella
    thefly@acaro.org
    GNU/PG keyid: 0x8EA95625

--AhhlLboLdkugWU4S
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFA6qroygeBqo6pViURAtdaAJ9WrJ3u5dIyalWizEudAhi5DewxnQCgr6N1
EWf16pdNTjDW0aBUvtR/FXE=
=iRUV
-----END PGP SIGNATURE-----

--AhhlLboLdkugWU4S--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040706133640.GB5922>