diff options
author | Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> | 2008-03-27 20:43:41 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-03-27 20:43:41 -0400 |
commit | 0dde3e16485dca16eb682dd59da1a598bf62e284 (patch) | |
tree | 9b3f3f1b54286ecf62e3101de104915a315a53c7 /include/linux/skbuff.h | |
parent | 4f95165d4bf6369d57052d60cc0266c569c6b077 (diff) |
[NET]: uninline skb_put, de-bloats a lot
Allyesconfig (v2.6.24-mm1):
~500 files changed
...
869 funcs, 198 +, 111003 -, diff: -110805 --- skb_put
skb_put | +104
Without number of debug related CONFIGs (v2.6.25-rc2-mm1):
-60744 855 funcs, 861 +, 61605 -, diff: -60744 --- skb_put
skb_put | +57
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/skbuff.h')
-rw-r--r-- | include/linux/skbuff.h | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 7beb239d2ee0..f085955cb5a7 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -892,6 +892,7 @@ static inline void skb_set_tail_pointer(struct sk_buff *skb, const int offset) | |||
892 | /* | 892 | /* |
893 | * Add data to an sk_buff | 893 | * Add data to an sk_buff |
894 | */ | 894 | */ |
895 | extern unsigned char *skb_put(struct sk_buff *skb, unsigned int len); | ||
895 | static inline unsigned char *__skb_put(struct sk_buff *skb, unsigned int len) | 896 | static inline unsigned char *__skb_put(struct sk_buff *skb, unsigned int len) |
896 | { | 897 | { |
897 | unsigned char *tmp = skb_tail_pointer(skb); | 898 | unsigned char *tmp = skb_tail_pointer(skb); |
@@ -901,26 +902,6 @@ static inline unsigned char *__skb_put(struct sk_buff *skb, unsigned int len) | |||
901 | return tmp; | 902 | return tmp; |
902 | } | 903 | } |
903 | 904 | ||
904 | /** | ||
905 | * skb_put - add data to a buffer | ||
906 | * @skb: buffer to use | ||
907 | * @len: amount of data to add | ||
908 | * | ||
909 | * This function extends the used data area of the buffer. If this would | ||
910 | * exceed the total buffer size the kernel will panic. A pointer to the | ||
911 | * first byte of the extra data is returned. | ||
912 | */ | ||
913 | static inline unsigned char *skb_put(struct sk_buff *skb, unsigned int len) | ||
914 | { | ||
915 | unsigned char *tmp = skb_tail_pointer(skb); | ||
916 | SKB_LINEAR_ASSERT(skb); | ||
917 | skb->tail += len; | ||
918 | skb->len += len; | ||
919 | if (unlikely(skb->tail > skb->end)) | ||
920 | skb_over_panic(skb, len, current_text_addr()); | ||
921 | return tmp; | ||
922 | } | ||
923 | |||
924 | static inline unsigned char *__skb_push(struct sk_buff *skb, unsigned int len) | 905 | static inline unsigned char *__skb_push(struct sk_buff *skb, unsigned int len) |
925 | { | 906 | { |
926 | skb->data -= len; | 907 | skb->data -= len; |