From: Sri Ram Vemulpali <hidden> Date: 2011-02-09 23:45:43
Hi all,
How do I map some space between kernel and user space. Can anyone
point me in to right direction. I was trying to map the packets from
my netfilter function to kernel user space, to avoid over head of
copying. Thanks in advance.
--
Regards,
Sri.
On Thu, Feb 10, 2011 at 06:45, Sri Ram Vemulpali
[off-list ref] wrote:
Hi all,
?How do I map some space between kernel and user space. Can anyone
point me in to right direction. I was trying to map the packets from
my netfilter function to kernel user space, to avoid over head of
copying. Thanks in advance.
Not trying to discourage you, but I assume your "filtering" function
will be engaged many many times in the case of rapid traffic...thus,
the buffer might grow rapidly too, right? In that case, are you sure
direct mapping could cope with it? Well unless you're ready to loose
some data .....
Anyway, I think you can do that by reserve the buffer in user space
and the get_user_page() them. As the bridge, a unique device with
ioctl() might do the job.
--
regards,
Mulyadi Santosa
Freelance Linux trainer and consultant
blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com
From: Sri Ram Vemulpali <hidden> Date: 2011-02-10 19:56:48
Hi Santosa,
Can you please be more explicit. I do manage buffers internally in
my module.
Some cases if it full I will lose data. Can you please provide more
detailed explanation
on how to approach this. Thanks.
--Sri
On Wed, Feb 9, 2011 at 10:21 PM, Mulyadi Santosa
[off-list ref] wrote:
On Thu, Feb 10, 2011 at 06:45, Sri Ram Vemulpali
[off-list ref] wrote:
quoted
Hi all,
?How do I map some space between kernel and user space. Can anyone
point me in to right direction. I was trying to map the packets from
my netfilter function to kernel user space, to avoid over head of
copying. Thanks in advance.
Not trying to discourage you, but I assume your "filtering" function
will be engaged many many times in the case of rapid traffic...thus,
the buffer might grow rapidly too, right? In that case, are you sure
direct mapping could cope with it? Well unless you're ready to loose
some data .....
Anyway, I think you can do that by reserve the buffer in user space
and the get_user_page() them. As the bridge, a unique device with
ioctl() might do the job.
--
regards,
Mulyadi Santosa
Freelance Linux trainer and consultant
blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com
From: YOUNGWHAN SONG <hidden> Date: 2011-02-11 12:42:00
Hi Sri,
On Feb 10, 2011, at 11:56 AM, Sri Ram Vemulpali wrote:
Hi Santosa,
Can you please be more explicit. I do manage buffers internally in
my module.
Some cases if it full I will lose data. Can you please provide more
detailed explanation
on how to approach this. Thanks.
--Sri
On Wed, Feb 9, 2011 at 10:21 PM, Mulyadi Santosa
[off-list ref] wrote:
quoted
On Thu, Feb 10, 2011 at 06:45, Sri Ram Vemulpali
[off-list ref] wrote:
quoted
Hi all,
How do I map some space between kernel and user space. Can anyone
point me in to right direction. I was trying to map the packets from
my netfilter function to kernel user space, to avoid over head of
copying. Thanks in advance.
Isn't it possible if your driver supports mmap? Have you checked it out in Linux Kernel Drive chapter 15?
quoted
Not trying to discourage you, but I assume your "filtering" function
will be engaged many many times in the case of rapid traffic...thus,
the buffer might grow rapidly too, right? In that case, are you sure
direct mapping could cope with it? Well unless you're ready to loose
some data .....
Anyway, I think you can do that by reserve the buffer in user space
and the get_user_page() them. As the bridge, a unique device with
ioctl() might do the job.
--
regards,
Mulyadi Santosa
Freelance Linux trainer and consultant
blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com
From: Rajat Sharma <hidden> Date: 2011-02-11 12:58:36
Hi Sri,
LKD chapter 15 is right resource for you. specifically you can look
for remap_pfn_range function to map I/O memory to user space.
Thanks,
Rajat
On Fri, Feb 11, 2011 at 6:12 PM, YOUNGWHAN SONG [off-list ref] wrote:
Hi Sri,
On Feb 10, 2011, at 11:56 AM, Sri Ram Vemulpali wrote:
quoted
Hi Santosa,
? Can you please be more explicit. I do manage buffers internally in
my module.
Some cases if it full I will lose data. Can you please provide more
detailed explanation
on how to approach this. Thanks.
--Sri
On Wed, Feb 9, 2011 at 10:21 PM, Mulyadi Santosa
[off-list ref] wrote:
quoted
On Thu, Feb 10, 2011 at 06:45, Sri Ram Vemulpali
[off-list ref] wrote:
quoted
Hi all,
?How do I map some space between kernel and user space. Can anyone
point me in to right direction. I was trying to map the packets from
my netfilter function to kernel user space, to avoid over head of
copying. Thanks in advance.
Isn't it possible if your driver supports mmap? Have you checked it out in Linux Kernel Drive chapter 15?
quoted
quoted
Not trying to discourage you, but I assume your "filtering" function
will be engaged many many times in the case of rapid traffic...thus,
the buffer might grow rapidly too, right? In that case, are you sure
direct mapping could cope with it? Well unless you're ready to loose
some data .....
Anyway, I think you can do that by reserve the buffer in user space
and the get_user_page() them. As the bridge, a unique device with
ioctl() might do the job.
--
regards,
Mulyadi Santosa
Freelance Linux trainer and consultant
blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com