Access data inside a skb with a struct iovec

From: Christoph Kreuzinger
Date: Thu Jan 28 2010 - 03:36:20 EST


Hi,

I'm working on a network protocol implementation. A received packet
will be queued to a receive queue 'skb_queue_tail()' when the receive
function for this protocol id is executed. Then there's a thread which
will dequeue one skb at a time to work with it.

I've noticed that the skb's dequeued are non-linear 'skb_has_frags()'
as my card has the NETIF_F_SG feature set. When I try to
skb_linearize() the skb it will be merged to a virual (and maybe even
physical) continues memory location, but this will increase the CPU
load which is bad at all.

My question: Is there any way that I can work with a
fragmented/non-linear skb and access the data inside
skb_shinfo(skb)->frags[] with a 'struct iovec *iov' so that I'm able
to pass the iovec to handler functions which accept them as an
argument?

Best Regards,
Christoph
--
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html