From: Emmanuel Varagnat <varagnat@crm.mot.com>
To: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: sk_buff allocation
Date: Tue, 12 Jun 2001 12:42:47 +0200 [thread overview]
Message-ID: <3B25F227.5A5EEBB4@crm.mot.com> (raw)
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
next reply other threads:[~2001-06-12 10:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-06-12 10:42 Emmanuel Varagnat [this message]
2001-06-12 10:53 ` sk_buff allocation Alexey Vyskubov
2001-06-12 11:49 ` Emmanuel Varagnat
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3B25F227.5A5EEBB4@crm.mot.com \
--to=varagnat@crm.mot.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox