netdev
[Top] [All Lists]

sk_buff allocation

To: "netdev@xxxxxxxxxxx" <netdev@xxxxxxxxxxx>
Subject: sk_buff allocation
From: Emmanuel Varagnat <varagnat@xxxxxxxxxxx>
Date: Tue, 12 Jun 2001 11:05:09 +0200
Organization: Motorola
Sender: owner-netdev@xxxxxxxxxxx
I'm writing a module that is able to modify outgoing packets.
This is done by registering a new entry in ptype_all.
But my problem is that in dev_queue_xmit_nit the sk_buff is
cloned and that my function get this clone. So my modification
on skb->data isn't take into account by the ethernet driver.

My idea was to do my modifications and then copy all my datas
starting at skb->data so that nothing in the sk_buff is modified.

But what am I doing if the buffer doesn't have enough room to
support the new/modified data ?
skb_cow or skb_copy_expand, for example, will return me a new
sk_buff with a new buffer but how could I tell the system that
it must "replace" the old sk_buff by this one ?

Thanks

-Emmanuel Varagnat

<Prev in Thread] Current Thread [Next in Thread>
  • sk_buff allocation, Emmanuel Varagnat <=