netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: cugyly@163.com, netdev@vger.kernel.org
Cc: "David S . Miller" <davem@davemloft.net>,
	yuan linyu <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 18:29:33 +0200	[thread overview]
Message-ID: <1497457773.9377.2.camel@sipsolutions.net> (raw)
In-Reply-To: <1497452424.3765.3.camel@163.com>

On Wed, 2017-06-14 at 23:00 +0800, yuan linyu wrote:

> sorry, I do them by hand. 

oh, ok.

This seems to work:

@@
identifier p;
expression len;
expression skb;
type t;
@@
-p = (t)skb_put(skb, len);
-memset(p, 0, len);
+p = (t)skb_put_zero(skb, len);

johannes

  reply	other threads:[~2017-06-14 16:29 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 [this message]
2017-06-14 16:31       ` Johannes Berg
2017-06-14 19:38         ` David Miller
2017-06-14 20:11           ` Johannes Berg
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=1497457773.9377.2.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).