From: Mohammad Jamal <md.jamalmohiuddin@gmail.com>
To: davem@davemloft.net, therbert@google.com, edumazet@google.com,
viro@zeniv.linux.org.uk, alexander.h.duyck@redhat.com,
willemb@google.com, hannes@stressinduktion.org,
linux-kernel@vger.kernel.org
Cc: Mohammad Jamal <md.jamalmohiuddin@gmail.com>
Subject: [PATCH] include:linux:Optimizations to __skb_push
Date: Thu, 22 Jan 2015 23:32:40 +0530 [thread overview]
Message-ID: <1421949760-5705-1-git-send-email-md.jamalmohiuddin@gmail.com> (raw)
This patch optimizes __skb_push function
Signed-off-by: Mohammad Jamal <md.jamalmohiuddin@gmail.com>
---
include/linux/skbuff.h | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 85ab7d7..9acffb2 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -1671,9 +1671,8 @@ static inline unsigned char *__skb_put(struct sk_buff *skb, unsigned int len)
unsigned char *skb_push(struct sk_buff *skb, unsigned int len);
static inline unsigned char *__skb_push(struct sk_buff *skb, unsigned int len)
{
- skb->data -= len;
skb->len += len;
- return skb->data;
+ return skb->data -= len;
}
unsigned char *skb_pull(struct sk_buff *skb, unsigned int len);
--
1.7.9.5
next reply other threads:[~2015-01-22 18:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-22 18:02 Mohammad Jamal [this message]
2015-01-22 18:21 ` Tom Herbert
2015-01-22 18:24 ` Eric Dumazet
2015-01-23 1:04 ` Jamal Mohammad
2015-01-23 9:05 ` 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=1421949760-5705-1-git-send-email-md.jamalmohiuddin@gmail.com \
--to=md.jamalmohiuddin@gmail.com \
--cc=alexander.h.duyck@redhat.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hannes@stressinduktion.org \
--cc=linux-kernel@vger.kernel.org \
--cc=therbert@google.com \
--cc=viro@zeniv.linux.org.uk \
--cc=willemb@google.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
Powered by JetHome