zero-copy UDP send in kernel

From: devnetfs (
Date: Tue Oct 08 2002 - 12:56:22 EST


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,

Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos & More
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Tue Oct 15 2002 - 22:00:25 EST