From: Eric Dumazet <eric.dumazet@gmail.com>
To: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Cc: netdev@vger.kernel.org,
Steve Glendinning <steve.glendinning@shawell.net>
Subject: Re: smsc75xx & smsc95xx, setting skb->truesize correctly?
Date: Wed, 22 Aug 2012 08:34:46 +0200 [thread overview]
Message-ID: <1345617286.5158.576.camel@edumazet-glaptop> (raw)
In-Reply-To: <20120822083549.57260n3jdqfgxtj4@www.81.fi>
On Wed, 2012-08-22 at 08:35 +0300, Jussi Kivilinna wrote:
> Quoting Eric Dumazet <eric.dumazet@gmail.com>:
>
> > On Mon, 2012-08-20 at 17:57 +0300, Jussi Kivilinna wrote:
> >> Hello,
> >>
> >> Is setting skb->truesize in smsc75xx and smsc95xx correct?
> >> In smsc75xx/smsc95xx_rx_fixup(), input skb containing multiple packets
> >> is cloned and truesize for each clone is set to packet-size +
> >> sizeof(struct sk_buff), but input skb has minimum allocation size of
> >> 9000 bytes (MAX_SINGLE_PACKET_SIZE) and maximum of 18944 bytes
> >> (DEFAULT_HS_BURST_CAP_SIZE) (+ NET_IP_ALIGN). Doesn't this cause
> >> truesize to be underestimated?
> >
> > This has been discussed in a "TCP transmit performance regression"
> > thread some weeks ago.
> >
> > More generally, skb_clone() is not a good idea in rx path.
>
> So all skb_clone use in drivers/net/usb/ should be removed/replaced
> with following?
Doing a copy might be expensive on some low end hardware, so I can
understand why this skb_clone() idea was deployed years ago.
Gigabit r8169 has to perform the copy because of security issue, and so
far nobody complained of performance impact.
Best thing would be to not use large buffers from the beginning,
and switch to a frag idea.
(A large frame would needs 2 or 3 medium buffers, as done in ath9k)
Check https://gerrit.chromium.org/gerrit/#/c/18412/
and commit 0d95521ea74735826cb2e28bebf6a07392c75bfa (ath9k: use split rx
buffers to get rid of order-1 skb allocations)
prev parent reply other threads:[~2012-08-22 6:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-20 14:57 smsc75xx & smsc95xx, setting skb->truesize correctly? Jussi Kivilinna
2012-08-21 9:46 ` Eric Dumazet
2012-08-22 5:35 ` Jussi Kivilinna
2012-08-22 6:34 ` Eric Dumazet [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=1345617286.5158.576.camel@edumazet-glaptop \
--to=eric.dumazet@gmail.com \
--cc=jussi.kivilinna@mbnet.fi \
--cc=netdev@vger.kernel.org \
--cc=steve.glendinning@shawell.net \
/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