From: Johannes Berg <johannes@sipsolutions.net>
To: David Miller <davem@davemloft.net>
Cc: cugyly@163.com, netdev@vger.kernel.org, Linyu.Yuan@alcatel-sbell.com.cn
Subject: Re: [PATCH net-next 00/11] skb_put_zero() used to optimize code
Date: Wed, 14 Jun 2017 22:11:54 +0200 [thread overview]
Message-ID: <1497471114.9377.9.camel@sipsolutions.net> (raw)
In-Reply-To: <20170614.153850.858684905893972084.davem@davemloft.net>
On Wed, 2017-06-14 at 15:38 -0400, David Miller wrote:
> What do you think about Stephen Hemminger's feedback to make
> skb_put_zero() return "void *". It will avoid a lot of casts and
> make the conversions look nicer.
I think it's a good idea. I can send a patch, and remove some casts
where they exist - I guess we could also do it even for skb_put()
eventually.
> I'll also defer on this patch series until we have the spatch thing
> which can catch all of them.
I think I have something that covers most cases, will send out an RFC
in a minute (since I'm not sure I was able to build it all yet).
Note that some of the cases like in ipv6/ndisc.c certainly can't be
done automatically, they look correct but are more complicated because
there's not just a single big memset(), but they're doing it piece by
piece (fill some bytes, clear some others, etc.) Might be worth
checking which aren't covered by the spatch.
johannes
next prev parent reply other threads:[~2017-06-14 20:12 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-14 14:30 [PATCH net-next 00/11] skb_put_zero() used to optimize code yuan linyu
2017-06-14 14:42 ` Johannes Berg
2017-06-14 15:00 ` yuan linyu
2017-06-14 16:29 ` Johannes Berg
2017-06-14 16:31 ` Johannes Berg
2017-06-14 19:38 ` David Miller
2017-06-14 20:11 ` Johannes Berg [this message]
2017-06-14 20:15 ` David Miller
2017-06-14 23:45 ` YUAN Linyu
2017-06-15 6:58 ` Johannes Berg
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=1497471114.9377.9.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=Linyu.Yuan@alcatel-sbell.com.cn \
--cc=cugyly@163.com \
--cc=davem@davemloft.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).