netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Joe Perches <joe@perches.com>, netdev@vger.kernel.org
Subject: Re: [PATCH] skbuff: make skb_put_zero() return void
Date: Fri, 16 Jun 2017 00:17:25 +0200	[thread overview]
Message-ID: <1497565045.2518.14.camel@sipsolutions.net> (raw)
In-Reply-To: <1497475096.18751.76.camel@perches.com>

On Wed, 2017-06-14 at 14:18 -0700, Joe Perches wrote:
> On Wed, 2017-06-14 at 22:40 +0200, Johannes Berg wrote:
> > On Wed, 2017-06-14 at 13:36 -0700, Joe Perches wrote:
> > > 
> > > Given you are adding a lot of these, it might be better
> > > to add an exported function that duplicates most of
> > > skb_put with a memset at the end.
> > 
> > Yeah, could be done. I'm not sure why you'd want to duplicate it
> > rather
> > than call it though? To make it about as fast?
> 
> Yeah, that and reduced stack use.
> 
> Dunno how performance sensitive these uses really are
> but it seems some might be for slow cpu wireless APs in
> both the rx and tx paths.

I haven't really checked now, but the wireless (mac80211) ones I saw
weren't in the data TX/RX, only for management SKBs which are pretty
much a slowpath.

Anyway, I guess you know how to propose a patch with this :-)

However, I think in that case there should be something like
skb_pull_inline, so that the skb_put code here isn't all copied around,
but just lives in a single place that gets inlined into skb_put() and
skb_put_zero().

johannes

  reply	other threads:[~2017-06-15 22:17 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-14 20:17 [PATCH] skbuff: make skb_put_zero() return void Johannes Berg
2017-06-14 20:36 ` Joe Perches
2017-06-14 20:40   ` Johannes Berg
2017-06-14 21:18     ` Joe Perches
2017-06-15 22:17       ` Johannes Berg [this message]
2017-06-15 22:55         ` Joe Perches
2017-06-15 16:18 ` David Miller
2017-06-15 19:28   ` Johannes Berg
2017-06-15 21:26     ` David Miller
2017-06-15 21:28       ` Johannes Berg
2017-06-15 22:17         ` Joe Perches
2017-06-15 22:21           ` Johannes Berg
2017-06-15 22:30             ` Joe Perches
2017-06-15 22:23           ` Johannes Berg
2017-06-15 22:38             ` Joe Perches

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=1497565045.2518.14.camel@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=joe@perches.com \
    --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).