From: jamal <hadi@cyberus.ca>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Jiri Pirko <jpirko@redhat.com>,
netdev@vger.kernel.org, davem@davemloft.net, kaber@trash.net
Subject: Re: Question about an assignment in handle_ing()
Date: Tue, 25 May 2010 08:03:44 -0400 [thread overview]
Message-ID: <1274789024.3878.919.camel@bigi> (raw)
In-Reply-To: <20100525102603.GA11494@gondor.apana.org.au>
On Tue, 2010-05-25 at 20:26 +1000, Herbert Xu wrote:
> In that case you should be checking whether the skb is cloned.
That is the general rule used (and what i specify to do in the docs)..
but i recall there were issues if the packet path emanated from ingress
and included multiple netdevices (earlier ex with mirror applies). There
may have been bugs then, eg I could not assume that it i had any ptype
at all that the ptype will clone the packet. Does tcpdump guarantee
skb->clone being set? I will try to test some scenarios when i am back
+settled.
> After all, tcpdump might have simply filtered the packet out.
True - but i think thats an acceptable compromise.
> BTW, this is the case whenever you run a DHCP client/server. So
> on most boxes your optimisation will never kick in as is.
"Most" for people running serious firewalls or routers is not to run
DHCP servers;-> They may client, but thats a short-lived session.
> Also
> the skb may still be cloned even if there is no AF_PACKET listener.
> In that case your optimisation may be incorrect.
Did you mean that as long as there are other ptypes - which may or
not be doing af packet?
cheers,
jamal
next prev parent reply other threads:[~2010-05-25 12:03 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-24 11:22 Question about an assignment in handle_ing() Jiri Pirko
2010-05-25 9:51 ` jamal
2010-05-25 10:26 ` Herbert Xu
2010-05-25 12:03 ` jamal [this message]
2010-05-25 12:12 ` Herbert Xu
2010-05-25 12:20 ` jamal
2010-05-25 12:46 ` Herbert Xu
2010-05-25 13:13 ` jamal
2010-05-25 23:13 ` Herbert Xu
2010-05-26 11:38 ` jamal
2010-05-30 13:29 ` jamal
2010-06-03 8:01 ` Herbert Xu
2010-06-03 12:43 ` jamal
2010-06-03 12:47 ` Herbert Xu
2010-06-03 12:53 ` jamal
2010-06-03 12:56 ` Herbert Xu
2010-06-03 12:58 ` Herbert Xu
2010-06-03 12:58 ` jamal
2010-06-03 13:00 ` Herbert Xu
2010-06-03 13:01 ` jamal
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=1274789024.3878.919.camel@bigi \
--to=hadi@cyberus.ca \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=jpirko@redhat.com \
--cc=kaber@trash.net \
--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).