From: Junchang Wang <junchangwang@gmail.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Changli Gao <xiaosuo@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Tom Herbert <therbert@google.com>, Jiri Pirko <jpirko@redhat.com>,
Fenghua Yu <fenghua.yu@intel.com>,
Xinan Tang <xinan.tang@intel.com>,
netdev@vger.kernel.org
Subject: Re: [PATCH] net: increase skb->users instead of skb_clone()
Date: Thu, 16 Dec 2010 22:31:34 +0800 [thread overview]
Message-ID: <AANLkTimd96KoT1-KqeiF7i10pH3pfML=rsUho=cCancU@mail.gmail.com> (raw)
In-Reply-To: <1292509118.2883.167.camel@edumazet-laptop>
On Thu, Dec 16, 2010 at 10:18 PM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
>
> Yes, and no.
>
> Consider the case you have one receiver.
>
> Packet given after Changli patch wont be shared, so packet_rcv wont
> clone it : Thats a win. Only one skb_clone() done instead of two.
>
> Consider case with 2 receivers :
>
> First time we call packet_rcv, packet is shared (because we call
> deliver_skb(), so packet_rcv clones it. Normal situation, we really need
> to clone it.
Got it. Thanks.
>
> Second time, we give a non shared packet : Thats a win over previous
> situation.
>
But, if we have N receivers, we get only the last one win - the first N-1 will
call deliver_skb().
Thanks.
--
--Junchang
next prev parent reply other threads:[~2010-12-16 14:31 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-16 5:57 [PATCH] net: increase skb->users instead of skb_clone() Changli Gao
2010-12-16 7:18 ` Eric Dumazet
2010-12-16 7:23 ` Changli Gao
2010-12-16 7:50 ` Eric Dumazet
2010-12-16 14:20 ` Junchang Wang
2010-12-16 14:30 ` Eric Dumazet
2010-12-16 14:05 ` Junchang Wang
2010-12-16 14:12 ` Changli Gao
2010-12-16 14:36 ` Junchang Wang
2010-12-16 14:18 ` Eric Dumazet
2010-12-16 14:31 ` Junchang Wang [this message]
2010-12-16 14:41 ` Eric Dumazet
2010-12-16 14:43 ` Changli Gao
2010-12-17 0:24 ` Junchang Wang
2010-12-20 5:50 ` David Miller
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='AANLkTimd96KoT1-KqeiF7i10pH3pfML=rsUho=cCancU@mail.gmail.com' \
--to=junchangwang@gmail.com \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=fenghua.yu@intel.com \
--cc=jpirko@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=therbert@google.com \
--cc=xiaosuo@gmail.com \
--cc=xinan.tang@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).