netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: stephen.hemminger@vyatta.com
Cc: tomas.winkler@intel.com, shemminger@vyatta.com,
	johannes@sipsolutions.net, netdev@vger.kernel.org,
	linux-wireless@vger.kernel.org
Subject: Re: [PATCH net-2.6] bridge: fix br_multicast_ipv6_rcv for paged skbs
Date: Fri, 31 Dec 2010 12:45:33 -0800 (PST)	[thread overview]
Message-ID: <20101231.124533.15243601.davem@davemloft.net> (raw)
In-Reply-To: <9mk4bme8o97ir27xi8a9fbsd.1293750376929@email.android.com>

From: Stephen Hemminger <stephen.hemminger@vyatta.com>
Date: Thu, 30 Dec 2010 15:06:16 -0800

> Although copy is slower for large packets, this is a non performance
> path. The code in question is for bridged multicast Ipv6 ICMP
> packets. This case is so uncritical it could be done in BASIC and no
> one could possibly care!

I still think we should be judicious and keep using skb_clone() here.

Simply combine the two pskb_may_pull() calls into one on "skb2" after
the clone and before the blind __skb_pull() call.  Then add a error
path "out:" called "out_nopush:" for the error path to goto.

Also, I think the "+ 1" in the ipv6 stack code comes from the fact that
the parsing loop can "peek" into the next header's byte to see the type.
And I really don't think it's relevant here.

Also, all of these "x_header + ... + 1 - skb->data" factors are
irrelevent and shouldn't be used.  Just pass "offset + sizeof(*icmp6h)"
to pskb_may_pull().


  parent reply	other threads:[~2010-12-31 20:45 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-30 23:06 [PATCH net-2.6] bridge: fix br_multicast_ipv6_rcv for paged skbs Stephen Hemminger
     [not found] ` <9mk4bme8o97ir27xi8a9fbsd.1293750376929-2ueSQiBKiTY7tOexoI0I+QC/G2K4zDHf@public.gmane.org>
2010-12-30 23:29   ` Winkler, Tomas
     [not found]     ` <6F5C1D715B2DA5498A628E6B9C124F04019BF36ABD-KS4eWWg9cz+vNW/NfzhIbrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2010-12-31 10:18       ` Johannes Berg
2010-12-31 20:45 ` David Miller [this message]
2010-12-31 21:16   ` Winkler, Tomas
  -- strict thread matches above, loose matches on Subject: below --
2010-12-29 16:12 BUG: while bridging Ethernet and wireless device: Tomas Winkler
2010-12-30 11:32 ` [PATCH net-2.6] bridge: fix br_multicast_ipv6_rcv for paged skbs Tomas Winkler
2010-12-30 18:46   ` Stephen Hemminger
2010-12-30 18:52     ` Johannes Berg
     [not found]       ` <1293735134.21956.1.camel-8upI4CBIZJIJvtFkdXX2HixXY32XiHfO@public.gmane.org>
2010-12-30 19:06         ` Stephen Hemminger
2010-12-30 21:00           ` Winkler, Tomas

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=20101231.124533.15243601.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=shemminger@vyatta.com \
    --cc=stephen.hemminger@vyatta.com \
    --cc=tomas.winkler@intel.com \
    /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).