From: jamal <hadi@cyberus.ca>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: netdev@vger.kernel.org
Subject: Re: tc_verd vs. skb_clone
Date: Sat, 13 Oct 2007 04:04:26 -0400 [thread overview]
Message-ID: <1192262666.4434.16.camel@localhost> (raw)
In-Reply-To: <20071012140026.GA27761@gondor.apana.org.au>
On Fri, 2007-12-10 at 22:00 +0800, Herbert Xu wrote:
> Hi Jamal:
>
> I was wondering why we're not copying tc_verd as is in skb_clone.
> In particular, this makes pskb_copy behave differently compared
> to skb_clone and I can't find a justificatino for it.
>
> Any ideas?
In the case of an action branching (from a graph), they clone. In the
case they want to trample on an skb, they copy; otherwise it continues
processing in the graph with none of the above. In the clone case,
certain metadata needs reseting (like the "it is ok to munge on this
packet" to "it is _not_ ok to munge on it" etc). We allow the copy case
leeway to do whatever it wants since it is going to tranple on the skb
and therefore reset nothing.
Would something more verbose in Documentation/net help to make this
clear?
If it is causing trouble, then one idea would be to move the resetting
to a wrapper function which calls clone first and then resets the other
fields. All actions currently cloning would need to be mod-ed to use
that call.
> Also we don't seem to copy iif in copy_skb_header.
I cant think of a good reason why it shouldnt be copied or recall
whether thats how its been from the begining. The reason probably it
hasnt mattered so far is everything that needs to write the iif never
copies.
cheers,
jamal
prev parent reply other threads:[~2007-10-13 8:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-12 14:00 tc_verd vs. skb_clone Herbert Xu
2007-10-13 8:04 ` jamal [this message]
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=1192262666.4434.16.camel@localhost \
--to=hadi@cyberus.ca \
--cc=herbert@gondor.apana.org.au \
--cc=netdev@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;
as well as URLs for NNTP newsgroup(s).