Re: mmap/munmap bug

2005-03-22 Thread Hayim Shaul
What I thought of doing, is map the skbuff to user-space. Have the user-application alter the headers. Send the (same) skbuff from kernel-space. Does there exist anything equivalent? yes; netfilter has facilities for this actually afaik. tcpdump also uses something like this (but only in one direct

Re: mmap/munmap bug

2005-03-22 Thread Hayim Shaul
The page contains the data part of the skbuff, so I guess it is used by a slab. Isn't this the idea of mapcount? to keep count of number of mapping to a page, and free the page only when this ref-count reaches zero?? I don't mind the slab being freed and the page not. My application won't acce

Re: mmap/munmap bug

2005-03-22 Thread Arjan van de Ven
On Tue, 2005-03-22 at 10:23 +0200, Hayim Shaul wrote: > >> Does it support zero copy not only for send but also for receive? Can we > >> receive packets directly to userspace buffers? > > > > that it can't currently, but without some major protocol stack rework > > that's not going to be easy. If y

Re: mmap/munmap bug

2005-03-22 Thread Hayim Shaul
Does it support zero copy not only for send but also for receive? Can we receive packets directly to userspace buffers? that it can't currently, but without some major protocol stack rework that's not going to be easy. If you want to help do that work, excellent! Be sure to contact the people on ne

Re: mmap/munmap bug

2005-03-22 Thread Arjan van de Ven
On Tue, 2005-03-22 at 09:56 +0200, Gleb Natapov wrote: > On Mon, Mar 21, 2005 at 07:34:02PM +0100, Arjan van de Ven wrote: > > On Mon, 2005-03-21 at 17:32 +0200, Hayim Shaul wrote: > > > Hi all, > > > > > > I have an unexplained bug with mmap/munmap on 2.6.X. > > > > > > I'm writing a kernel modu

Re: mmap/munmap bug

2005-03-22 Thread Gleb Natapov
On Mon, Mar 21, 2005 at 07:34:02PM +0100, Arjan van de Ven wrote: > On Mon, 2005-03-21 at 17:32 +0200, Hayim Shaul wrote: > > Hi all, > > > > I have an unexplained bug with mmap/munmap on 2.6.X. > > > > I'm writing a kernel module that gives super-fast access to the network. > > It does so by doi

Re: mmap/munmap bug

2005-03-21 Thread Arjan van de Ven
On Mon, 2005-03-21 at 17:32 +0200, Hayim Shaul wrote: > Hi all, > > I have an unexplained bug with mmap/munmap on 2.6.X. > > I'm writing a kernel module that gives super-fast access to the network. > It does so by doing mmap thus avoiding the memcpy to/from user. well... you are aware the networ