mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] include:linux:Optimizations to __skb_push
@ 2015-01-22 18:02 Mohammad Jamal
  2015-01-22 18:21 ` Tom Herbert
  2015-01-23  9:05 ` David Miller
  0 siblings, 2 replies; 5+ messages in thread
From: Mohammad Jamal @ 2015-01-22 18:02 UTC (permalink / raw)
  To: davem, therbert, edumazet, viro, alexander.h.duyck, willemb,
	hannes, linux-kernel
  Cc: Mohammad Jamal

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-01-23  9:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-22 18:02 [PATCH] include:linux:Optimizations to __skb_push Mohammad Jamal
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

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