Skip to contentSkip to conversation

zero-copy UDP send in kernel

DISCUSSION devnetfs 1 participant 1 message Oct 8, 2002

lore
Share & tools
lore

devnetfs

author
#0 lore raw

Hello,

I have a buffer in kernel (module), which I need to send over the n/w as UDP pkt. I am creating an socket (sock) and using sock->ops->sendmsg(). And sendmsg() takes 'struct msghdr' containing a iovec, which points to my buffer.

The problem is, sendmsg() internally does an additional copy (from iovec to an sk_buff). Can this be avoided? I mean can the sk_buff's data buffer pointers be made to point to my buffer? or something else, to avoid this 'copying'.

Copying from one region (my buffer) to another (sk_buff) of the kernel seems to be real _waste_.

I have heard something about non-linear sk_buff's. Can they be used in such scenario?

Thanks in Advance,
Abhi.

__________________________________________________
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos & More
http://faith.yahoo.com