aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/skbuff.h
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2013-09-26 17:48:15 -0400
committerJoe Perches <joe@perches.com>2013-09-26 17:53:19 -0400
commit7965bd4d71ef7cf1db00afb9e406ddfc13443c13 (patch)
tree580d04df7eb2576a4d239702c54b6e37b968efad /include/linux/skbuff.h
parenta0f4ecf3494c9869d20f606e7e2b2f50f0e67a7f (diff)
net.h/skbuff.h: Remove extern from function prototypes
There are a mix of function prototypes with and without extern in the kernel sources. Standardize on not using extern for function prototypes. Function prototypes don't need to be written with extern. extern is assumed by the compiler. Its use is as unnecessary as using auto to declare automatic/local variables in a block. Signed-off-by: Joe Perches <joe@perches.com>
Diffstat (limited to 'include/linux/skbuff.h')
-rw-r--r--include/linux/skbuff.h250
1 files changed, 111 insertions, 139 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 2ddb48d9312c..6d56840e561e 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -585,8 +585,8 @@ static inline void skb_dst_set(struct sk_buff *skb, struct dst_entry *dst)
585 skb->_skb_refdst = (unsigned long)dst; 585 skb->_skb_refdst = (unsigned long)dst;
586} 586}
587 587
588extern void __skb_dst_set_noref(struct sk_buff *skb, struct dst_entry *dst, 588void __skb_dst_set_noref(struct sk_buff *skb, struct dst_entry *dst,
589 bool force); 589 bool force);
590 590
591/** 591/**
592 * skb_dst_set_noref - sets skb dst, hopefully, without taking reference 592 * skb_dst_set_noref - sets skb dst, hopefully, without taking reference
@@ -634,20 +634,20 @@ static inline struct rtable *skb_rtable(const struct sk_buff *skb)
634 return (struct rtable *)skb_dst(skb); 634 return (struct rtable *)skb_dst(skb);
635} 635}
636 636
637extern void kfree_skb(struct sk_buff *skb); 637void kfree_skb(struct sk_buff *skb);
638extern void kfree_skb_list(struct sk_buff *segs); 638void kfree_skb_list(struct sk_buff *segs);
639extern void skb_tx_error(struct sk_buff *skb); 639void skb_tx_error(struct sk_buff *skb);
640extern void consume_skb(struct sk_buff *skb); 640void consume_skb(struct sk_buff *skb);
641extern void __kfree_skb(struct sk_buff *skb); 641void __kfree_skb(struct sk_buff *skb);
642extern struct kmem_cache *skbuff_head_cache; 642extern struct kmem_cache *skbuff_head_cache;
643 643
644extern void kfree_skb_partial(struct sk_buff *skb, bool head_stolen); 644void kfree_skb_partial(struct sk_buff *skb, bool head_stolen);
645extern bool skb_try_coalesce(struct sk_buff *to, struct sk_buff *from, 645bool skb_try_coalesce(struct sk_buff *to, struct sk_buff *from,
646 bool *fragstolen, int *delta_truesize); 646 bool *fragstolen, int *delta_truesize);
647 647
648extern struct sk_buff *__alloc_skb(unsigned int size, 648struct sk_buff *__alloc_skb(unsigned int size, gfp_t priority, int flags,
649 gfp_t priority, int flags, int node); 649 int node);
650extern struct sk_buff *build_skb(void *data, unsigned int frag_size); 650struct sk_buff *build_skb(void *data, unsigned int frag_size);
651static inline struct sk_buff *alloc_skb(unsigned int size, 651static inline struct sk_buff *alloc_skb(unsigned int size,
652 gfp_t priority) 652 gfp_t priority)
653{ 653{
@@ -660,41 +660,33 @@ static inline struct sk_buff *alloc_skb_fclone(unsigned int size,
660 return __alloc_skb(size, priority, SKB_ALLOC_FCLONE, NUMA_NO_NODE); 660 return __alloc_skb(size, priority, SKB_ALLOC_FCLONE, NUMA_NO_NODE);
661} 661}
662 662
663extern struct sk_buff *__alloc_skb_head(gfp_t priority, int node); 663struct sk_buff *__alloc_skb_head(gfp_t priority, int node);
664static inline struct sk_buff *alloc_skb_head(gfp_t priority) 664static inline struct sk_buff *alloc_skb_head(gfp_t priority)
665{ 665{
666 return __alloc_skb_head(priority, -1); 666 return __alloc_skb_head(priority, -1);
667} 667}
668 668
669extern struct sk_buff *skb_morph(struct sk_buff *dst, struct sk_buff *src); 669struct sk_buff *skb_morph(struct sk_buff *dst, struct sk_buff *src);
670extern int skb_copy_ubufs(struct sk_buff *skb, gfp_t gfp_mask); 670int skb_copy_ubufs(struct sk_buff *skb, gfp_t gfp_mask);
671extern struct sk_buff *skb_clone(struct sk_buff *skb, 671struct sk_buff *skb_clone(struct sk_buff *skb, gfp_t priority);
672 gfp_t priority); 672struct sk_buff *skb_copy(const struct sk_buff *skb, gfp_t priority);
673extern struct sk_buff *skb_copy(const struct sk_buff *skb, 673struct sk_buff *__pskb_copy(struct sk_buff *skb, int headroom, gfp_t gfp_mask);
674 gfp_t priority); 674
675extern struct sk_buff *__pskb_copy(struct sk_buff *skb, 675int pskb_expand_head(struct sk_buff *skb, int nhead, int ntail, gfp_t gfp_mask);
676 int headroom, gfp_t gfp_mask); 676struct sk_buff *skb_realloc_headroom(struct sk_buff *skb,
677 677 unsigned int headroom);
678extern int pskb_expand_head(struct sk_buff *skb, 678struct sk_buff *skb_copy_expand(const struct sk_buff *skb, int newheadroom,
679 int nhead, int ntail, 679 int newtailroom, gfp_t priority);
680 gfp_t gfp_mask); 680int skb_to_sgvec(struct sk_buff *skb, struct scatterlist *sg, int offset,
681extern struct sk_buff *skb_realloc_headroom(struct sk_buff *skb, 681 int len);
682 unsigned int headroom); 682int skb_cow_data(struct sk_buff *skb, int tailbits, struct sk_buff **trailer);
683extern struct sk_buff *skb_copy_expand(const struct sk_buff *skb, 683int skb_pad(struct sk_buff *skb, int pad);
684 int newheadroom, int newtailroom,
685 gfp_t priority);
686extern int skb_to_sgvec(struct sk_buff *skb,
687 struct scatterlist *sg, int offset,
688 int len);
689extern int skb_cow_data(struct sk_buff *skb, int tailbits,
690 struct sk_buff **trailer);
691extern int skb_pad(struct sk_buff *skb, int pad);
692#define dev_kfree_skb(a) consume_skb(a) 684#define dev_kfree_skb(a) consume_skb(a)
693 685
694extern int skb_append_datato_frags(struct sock *sk, struct sk_buff *skb, 686int skb_append_datato_frags(struct sock *sk, struct sk_buff *skb,
695 int getfrag(void *from, char *to, int offset, 687 int getfrag(void *from, char *to, int offset,
696 int len,int odd, struct sk_buff *skb), 688 int len, int odd, struct sk_buff *skb),
697 void *from, int length); 689 void *from, int length);
698 690
699struct skb_seq_state { 691struct skb_seq_state {
700 __u32 lower_offset; 692 __u32 lower_offset;
@@ -706,18 +698,17 @@ struct skb_seq_state {
706 __u8 *frag_data; 698 __u8 *frag_data;
707}; 699};
708 700
709extern void skb_prepare_seq_read(struct sk_buff *skb, 701void skb_prepare_seq_read(struct sk_buff *skb, unsigned int from,
710 unsigned int from, unsigned int to, 702 unsigned int to, struct skb_seq_state *st);
711 struct skb_seq_state *st); 703unsigned int skb_seq_read(unsigned int consumed, const u8 **data,
712extern unsigned int skb_seq_read(unsigned int consumed, const u8 **data, 704 struct skb_seq_state *st);
713 struct skb_seq_state *st); 705void skb_abort_seq_read(struct skb_seq_state *st);
714extern void skb_abort_seq_read(struct skb_seq_state *st);
715 706
716extern unsigned int skb_find_text(struct sk_buff *skb, unsigned int from, 707unsigned int skb_find_text(struct sk_buff *skb, unsigned int from,
717 unsigned int to, struct ts_config *config, 708 unsigned int to, struct ts_config *config,
718 struct ts_state *state); 709 struct ts_state *state);
719 710
720extern void __skb_get_rxhash(struct sk_buff *skb); 711void __skb_get_rxhash(struct sk_buff *skb);
721static inline __u32 skb_get_rxhash(struct sk_buff *skb) 712static inline __u32 skb_get_rxhash(struct sk_buff *skb)
722{ 713{
723 if (!skb->l4_rxhash) 714 if (!skb->l4_rxhash)
@@ -1095,7 +1086,8 @@ static inline void skb_queue_head_init_class(struct sk_buff_head *list,
1095 * The "__skb_xxxx()" functions are the non-atomic ones that 1086 * The "__skb_xxxx()" functions are the non-atomic ones that
1096 * can only be called with interrupts disabled. 1087 * can only be called with interrupts disabled.
1097 */ 1088 */
1098extern void skb_insert(struct sk_buff *old, struct sk_buff *newsk, struct sk_buff_head *list); 1089void skb_insert(struct sk_buff *old, struct sk_buff *newsk,
1090 struct sk_buff_head *list);
1099static inline void __skb_insert(struct sk_buff *newsk, 1091static inline void __skb_insert(struct sk_buff *newsk,
1100 struct sk_buff *prev, struct sk_buff *next, 1092 struct sk_buff *prev, struct sk_buff *next,
1101 struct sk_buff_head *list) 1093 struct sk_buff_head *list)
@@ -1201,8 +1193,8 @@ static inline void __skb_queue_after(struct sk_buff_head *list,
1201 __skb_insert(newsk, prev, prev->next, list); 1193 __skb_insert(newsk, prev, prev->next, list);
1202} 1194}
1203 1195
1204extern void skb_append(struct sk_buff *old, struct sk_buff *newsk, 1196void skb_append(struct sk_buff *old, struct sk_buff *newsk,
1205 struct sk_buff_head *list); 1197 struct sk_buff_head *list);
1206 1198
1207static inline void __skb_queue_before(struct sk_buff_head *list, 1199static inline void __skb_queue_before(struct sk_buff_head *list,
1208 struct sk_buff *next, 1200 struct sk_buff *next,
@@ -1221,7 +1213,7 @@ static inline void __skb_queue_before(struct sk_buff_head *list,
1221 * 1213 *
1222 * A buffer cannot be placed on two lists at the same time. 1214 * A buffer cannot be placed on two lists at the same time.
1223 */ 1215 */
1224extern void skb_queue_head(struct sk_buff_head *list, struct sk_buff *newsk); 1216void skb_queue_head(struct sk_buff_head *list, struct sk_buff *newsk);
1225static inline void __skb_queue_head(struct sk_buff_head *list, 1217static inline void __skb_queue_head(struct sk_buff_head *list,
1226 struct sk_buff *newsk) 1218 struct sk_buff *newsk)
1227{ 1219{
@@ -1238,7 +1230,7 @@ static inline void __skb_queue_head(struct sk_buff_head *list,
1238 * 1230 *
1239 * A buffer cannot be placed on two lists at the same time. 1231 * A buffer cannot be placed on two lists at the same time.
1240 */ 1232 */
1241extern void skb_queue_tail(struct sk_buff_head *list, struct sk_buff *newsk); 1233void skb_queue_tail(struct sk_buff_head *list, struct sk_buff *newsk);
1242static inline void __skb_queue_tail(struct sk_buff_head *list, 1234static inline void __skb_queue_tail(struct sk_buff_head *list,
1243 struct sk_buff *newsk) 1235 struct sk_buff *newsk)
1244{ 1236{
@@ -1249,7 +1241,7 @@ static inline void __skb_queue_tail(struct sk_buff_head *list,
1249 * remove sk_buff from list. _Must_ be called atomically, and with 1241 * remove sk_buff from list. _Must_ be called atomically, and with
1250 * the list known.. 1242 * the list known..
1251 */ 1243 */
1252extern void skb_unlink(struct sk_buff *skb, struct sk_buff_head *list); 1244void skb_unlink(struct sk_buff *skb, struct sk_buff_head *list);
1253static inline void __skb_unlink(struct sk_buff *skb, struct sk_buff_head *list) 1245static inline void __skb_unlink(struct sk_buff *skb, struct sk_buff_head *list)
1254{ 1246{
1255 struct sk_buff *next, *prev; 1247 struct sk_buff *next, *prev;
@@ -1270,7 +1262,7 @@ static inline void __skb_unlink(struct sk_buff *skb, struct sk_buff_head *list)
1270 * so must be used with appropriate locks held only. The head item is 1262 * so must be used with appropriate locks held only. The head item is
1271 * returned or %NULL if the list is empty. 1263 * returned or %NULL if the list is empty.
1272 */ 1264 */
1273extern struct sk_buff *skb_dequeue(struct sk_buff_head *list); 1265struct sk_buff *skb_dequeue(struct sk_buff_head *list);
1274static inline struct sk_buff *__skb_dequeue(struct sk_buff_head *list) 1266static inline struct sk_buff *__skb_dequeue(struct sk_buff_head *list)
1275{ 1267{
1276 struct sk_buff *skb = skb_peek(list); 1268 struct sk_buff *skb = skb_peek(list);
@@ -1287,7 +1279,7 @@ static inline struct sk_buff *__skb_dequeue(struct sk_buff_head *list)
1287 * so must be used with appropriate locks held only. The tail item is 1279 * so must be used with appropriate locks held only. The tail item is
1288 * returned or %NULL if the list is empty. 1280 * returned or %NULL if the list is empty.
1289 */ 1281 */
1290extern struct sk_buff *skb_dequeue_tail(struct sk_buff_head *list); 1282struct sk_buff *skb_dequeue_tail(struct sk_buff_head *list);
1291static inline struct sk_buff *__skb_dequeue_tail(struct sk_buff_head *list) 1283static inline struct sk_buff *__skb_dequeue_tail(struct sk_buff_head *list)
1292{ 1284{
1293 struct sk_buff *skb = skb_peek_tail(list); 1285 struct sk_buff *skb = skb_peek_tail(list);
@@ -1373,8 +1365,8 @@ static inline void skb_fill_page_desc(struct sk_buff *skb, int i,
1373 skb_shinfo(skb)->nr_frags = i + 1; 1365 skb_shinfo(skb)->nr_frags = i + 1;
1374} 1366}
1375 1367
1376extern void skb_add_rx_frag(struct sk_buff *skb, int i, struct page *page, 1368void skb_add_rx_frag(struct sk_buff *skb, int i, struct page *page, int off,
1377 int off, int size, unsigned int truesize); 1369 int size, unsigned int truesize);
1378 1370
1379#define SKB_PAGE_ASSERT(skb) BUG_ON(skb_shinfo(skb)->nr_frags) 1371#define SKB_PAGE_ASSERT(skb) BUG_ON(skb_shinfo(skb)->nr_frags)
1380#define SKB_FRAG_ASSERT(skb) BUG_ON(skb_has_frag_list(skb)) 1372#define SKB_FRAG_ASSERT(skb) BUG_ON(skb_has_frag_list(skb))
@@ -1418,7 +1410,7 @@ static inline void skb_set_tail_pointer(struct sk_buff *skb, const int offset)
1418/* 1410/*
1419 * Add data to an sk_buff 1411 * Add data to an sk_buff
1420 */ 1412 */
1421extern unsigned char *skb_put(struct sk_buff *skb, unsigned int len); 1413unsigned char *skb_put(struct sk_buff *skb, unsigned int len);
1422static inline unsigned char *__skb_put(struct sk_buff *skb, unsigned int len) 1414static inline unsigned char *__skb_put(struct sk_buff *skb, unsigned int len)
1423{ 1415{
1424 unsigned char *tmp = skb_tail_pointer(skb); 1416 unsigned char *tmp = skb_tail_pointer(skb);
@@ -1428,7 +1420,7 @@ static inline unsigned char *__skb_put(struct sk_buff *skb, unsigned int len)
1428 return tmp; 1420 return tmp;
1429} 1421}
1430 1422
1431extern unsigned char *skb_push(struct sk_buff *skb, unsigned int len); 1423unsigned char *skb_push(struct sk_buff *skb, unsigned int len);
1432static inline unsigned char *__skb_push(struct sk_buff *skb, unsigned int len) 1424static inline unsigned char *__skb_push(struct sk_buff *skb, unsigned int len)
1433{ 1425{
1434 skb->data -= len; 1426 skb->data -= len;
@@ -1436,7 +1428,7 @@ static inline unsigned char *__skb_push(struct sk_buff *skb, unsigned int len)
1436 return skb->data; 1428 return skb->data;
1437} 1429}
1438 1430
1439extern unsigned char *skb_pull(struct sk_buff *skb, unsigned int len); 1431unsigned char *skb_pull(struct sk_buff *skb, unsigned int len);
1440static inline unsigned char *__skb_pull(struct sk_buff *skb, unsigned int len) 1432static inline unsigned char *__skb_pull(struct sk_buff *skb, unsigned int len)
1441{ 1433{
1442 skb->len -= len; 1434 skb->len -= len;
@@ -1449,7 +1441,7 @@ static inline unsigned char *skb_pull_inline(struct sk_buff *skb, unsigned int l
1449 return unlikely(len > skb->len) ? NULL : __skb_pull(skb, len); 1441 return unlikely(len > skb->len) ? NULL : __skb_pull(skb, len);
1450} 1442}
1451 1443
1452extern unsigned char *__pskb_pull_tail(struct sk_buff *skb, int delta); 1444unsigned char *__pskb_pull_tail(struct sk_buff *skb, int delta);
1453 1445
1454static inline unsigned char *__pskb_pull(struct sk_buff *skb, unsigned int len) 1446static inline unsigned char *__pskb_pull(struct sk_buff *skb, unsigned int len)
1455{ 1447{
@@ -1753,7 +1745,7 @@ static inline int pskb_network_may_pull(struct sk_buff *skb, unsigned int len)
1753#define NET_SKB_PAD max(32, L1_CACHE_BYTES) 1745#define NET_SKB_PAD max(32, L1_CACHE_BYTES)
1754#endif 1746#endif
1755 1747
1756extern int ___pskb_trim(struct sk_buff *skb, unsigned int len); 1748int ___pskb_trim(struct sk_buff *skb, unsigned int len);
1757 1749
1758static inline void __skb_trim(struct sk_buff *skb, unsigned int len) 1750static inline void __skb_trim(struct sk_buff *skb, unsigned int len)
1759{ 1751{
@@ -1765,7 +1757,7 @@ static inline void __skb_trim(struct sk_buff *skb, unsigned int len)
1765 skb_set_tail_pointer(skb, len); 1757 skb_set_tail_pointer(skb, len);
1766} 1758}
1767 1759
1768extern void skb_trim(struct sk_buff *skb, unsigned int len); 1760void skb_trim(struct sk_buff *skb, unsigned int len);
1769 1761
1770static inline int __pskb_trim(struct sk_buff *skb, unsigned int len) 1762static inline int __pskb_trim(struct sk_buff *skb, unsigned int len)
1771{ 1763{
@@ -1838,7 +1830,7 @@ static inline int skb_orphan_frags(struct sk_buff *skb, gfp_t gfp_mask)
1838 * the list and one reference dropped. This function does not take the 1830 * the list and one reference dropped. This function does not take the
1839 * list lock and the caller must hold the relevant locks to use it. 1831 * list lock and the caller must hold the relevant locks to use it.
1840 */ 1832 */
1841extern void skb_queue_purge(struct sk_buff_head *list); 1833void skb_queue_purge(struct sk_buff_head *list);
1842static inline void __skb_queue_purge(struct sk_buff_head *list) 1834static inline void __skb_queue_purge(struct sk_buff_head *list)
1843{ 1835{
1844 struct sk_buff *skb; 1836 struct sk_buff *skb;
@@ -1850,11 +1842,10 @@ static inline void __skb_queue_purge(struct sk_buff_head *list)
1850#define NETDEV_FRAG_PAGE_MAX_SIZE (PAGE_SIZE << NETDEV_FRAG_PAGE_MAX_ORDER) 1842#define NETDEV_FRAG_PAGE_MAX_SIZE (PAGE_SIZE << NETDEV_FRAG_PAGE_MAX_ORDER)
1851#define NETDEV_PAGECNT_MAX_BIAS NETDEV_FRAG_PAGE_MAX_SIZE 1843#define NETDEV_PAGECNT_MAX_BIAS NETDEV_FRAG_PAGE_MAX_SIZE
1852 1844
1853extern void *netdev_alloc_frag(unsigned int fragsz); 1845void *netdev_alloc_frag(unsigned int fragsz);
1854 1846
1855extern struct sk_buff *__netdev_alloc_skb(struct net_device *dev, 1847struct sk_buff *__netdev_alloc_skb(struct net_device *dev, unsigned int length,
1856 unsigned int length, 1848 gfp_t gfp_mask);
1857 gfp_t gfp_mask);
1858 1849
1859/** 1850/**
1860 * netdev_alloc_skb - allocate an skbuff for rx on a specific device 1851 * netdev_alloc_skb - allocate an skbuff for rx on a specific device
@@ -2342,60 +2333,42 @@ static inline void skb_frag_add_head(struct sk_buff *skb, struct sk_buff *frag)
2342#define skb_walk_frags(skb, iter) \ 2333#define skb_walk_frags(skb, iter) \
2343 for (iter = skb_shinfo(skb)->frag_list; iter; iter = iter->next) 2334 for (iter = skb_shinfo(skb)->frag_list; iter; iter = iter->next)
2344 2335
2345extern struct sk_buff *__skb_recv_datagram(struct sock *sk, unsigned flags, 2336struct sk_buff *__skb_recv_datagram(struct sock *sk, unsigned flags,
2346 int *peeked, int *off, int *err); 2337 int *peeked, int *off, int *err);
2347extern struct sk_buff *skb_recv_datagram(struct sock *sk, unsigned flags, 2338struct sk_buff *skb_recv_datagram(struct sock *sk, unsigned flags, int noblock,
2348 int noblock, int *err); 2339 int *err);
2349extern unsigned int datagram_poll(struct file *file, struct socket *sock, 2340unsigned int datagram_poll(struct file *file, struct socket *sock,
2350 struct poll_table_struct *wait); 2341 struct poll_table_struct *wait);
2351extern int skb_copy_datagram_iovec(const struct sk_buff *from, 2342int skb_copy_datagram_iovec(const struct sk_buff *from, int offset,
2352 int offset, struct iovec *to, 2343 struct iovec *to, int size);
2353 int size); 2344int skb_copy_and_csum_datagram_iovec(struct sk_buff *skb, int hlen,
2354extern int skb_copy_and_csum_datagram_iovec(struct sk_buff *skb, 2345 struct iovec *iov);
2355 int hlen, 2346int skb_copy_datagram_from_iovec(struct sk_buff *skb, int offset,
2356 struct iovec *iov); 2347 const struct iovec *from, int from_offset,
2357extern int skb_copy_datagram_from_iovec(struct sk_buff *skb, 2348 int len);
2358 int offset, 2349int zerocopy_sg_from_iovec(struct sk_buff *skb, const struct iovec *frm,
2359 const struct iovec *from, 2350 int offset, size_t count);
2360 int from_offset, 2351int skb_copy_datagram_const_iovec(const struct sk_buff *from, int offset,
2361 int len); 2352 const struct iovec *to, int to_offset,
2362extern int zerocopy_sg_from_iovec(struct sk_buff *skb, 2353 int size);
2363 const struct iovec *frm, 2354void skb_free_datagram(struct sock *sk, struct sk_buff *skb);
2364 int offset, 2355void skb_free_datagram_locked(struct sock *sk, struct sk_buff *skb);
2365 size_t count); 2356int skb_kill_datagram(struct sock *sk, struct sk_buff *skb, unsigned int flags);
2366extern int skb_copy_datagram_const_iovec(const struct sk_buff *from, 2357__wsum skb_checksum(const struct sk_buff *skb, int offset, int len,
2367 int offset, 2358 __wsum csum);
2368 const struct iovec *to, 2359int skb_copy_bits(const struct sk_buff *skb, int offset, void *to, int len);
2369 int to_offset, 2360int skb_store_bits(struct sk_buff *skb, int offset, const void *from, int len);
2370 int size); 2361__wsum skb_copy_and_csum_bits(const struct sk_buff *skb, int offset, u8 *to,
2371extern void skb_free_datagram(struct sock *sk, struct sk_buff *skb); 2362 int len, __wsum csum);
2372extern void skb_free_datagram_locked(struct sock *sk, 2363int skb_splice_bits(struct sk_buff *skb, unsigned int offset,
2373 struct sk_buff *skb); 2364 struct pipe_inode_info *pipe, unsigned int len,
2374extern int skb_kill_datagram(struct sock *sk, struct sk_buff *skb, 2365 unsigned int flags);
2375 unsigned int flags); 2366void skb_copy_and_csum_dev(const struct sk_buff *skb, u8 *to);
2376extern __wsum skb_checksum(const struct sk_buff *skb, int offset, 2367void skb_split(struct sk_buff *skb, struct sk_buff *skb1, const u32 len);
2377 int len, __wsum csum); 2368int skb_shift(struct sk_buff *tgt, struct sk_buff *skb, int shiftlen);
2378extern int skb_copy_bits(const struct sk_buff *skb, int offset, 2369void skb_scrub_packet(struct sk_buff *skb, bool xnet);
2379 void *to, int len); 2370
2380extern int skb_store_bits(struct sk_buff *skb, int offset, 2371struct sk_buff *skb_segment(struct sk_buff *skb, netdev_features_t features);
2381 const void *from, int len);
2382extern __wsum skb_copy_and_csum_bits(const struct sk_buff *skb,
2383 int offset, u8 *to, int len,
2384 __wsum csum);
2385extern int skb_splice_bits(struct sk_buff *skb,
2386 unsigned int offset,
2387 struct pipe_inode_info *pipe,
2388 unsigned int len,
2389 unsigned int flags);
2390extern void skb_copy_and_csum_dev(const struct sk_buff *skb, u8 *to);
2391extern void skb_split(struct sk_buff *skb,
2392 struct sk_buff *skb1, const u32 len);
2393extern int skb_shift(struct sk_buff *tgt, struct sk_buff *skb,
2394 int shiftlen);
2395extern void skb_scrub_packet(struct sk_buff *skb, bool xnet);
2396
2397extern struct sk_buff *skb_segment(struct sk_buff *skb,
2398 netdev_features_t features);
2399 2372
2400static inline void *skb_header_pointer(const struct sk_buff *skb, int offset, 2373static inline void *skb_header_pointer(const struct sk_buff *skb, int offset,
2401 int len, void *buffer) 2374 int len, void *buffer)
@@ -2440,7 +2413,7 @@ static inline void skb_copy_to_linear_data_offset(struct sk_buff *skb,
2440 memcpy(skb->data + offset, from, len); 2413 memcpy(skb->data + offset, from, len);
2441} 2414}
2442 2415
2443extern void skb_init(void); 2416void skb_init(void);
2444 2417
2445static inline ktime_t skb_get_ktime(const struct sk_buff *skb) 2418static inline ktime_t skb_get_ktime(const struct sk_buff *skb)
2446{ 2419{
@@ -2483,12 +2456,12 @@ static inline ktime_t net_invalid_timestamp(void)
2483 return ktime_set(0, 0); 2456 return ktime_set(0, 0);
2484} 2457}
2485 2458
2486extern void skb_timestamping_init(void); 2459void skb_timestamping_init(void);
2487 2460
2488#ifdef CONFIG_NETWORK_PHY_TIMESTAMPING 2461#ifdef CONFIG_NETWORK_PHY_TIMESTAMPING
2489 2462
2490extern void skb_clone_tx_timestamp(struct sk_buff *skb); 2463void skb_clone_tx_timestamp(struct sk_buff *skb);
2491extern bool skb_defer_rx_timestamp(struct sk_buff *skb); 2464bool skb_defer_rx_timestamp(struct sk_buff *skb);
2492 2465
2493#else /* CONFIG_NETWORK_PHY_TIMESTAMPING */ 2466#else /* CONFIG_NETWORK_PHY_TIMESTAMPING */
2494 2467
@@ -2529,8 +2502,8 @@ void skb_complete_tx_timestamp(struct sk_buff *skb,
2529 * generates a software time stamp (otherwise), then queues the clone 2502 * generates a software time stamp (otherwise), then queues the clone
2530 * to the error queue of the socket. Errors are silently ignored. 2503 * to the error queue of the socket. Errors are silently ignored.
2531 */ 2504 */
2532extern void skb_tstamp_tx(struct sk_buff *orig_skb, 2505void skb_tstamp_tx(struct sk_buff *orig_skb,
2533 struct skb_shared_hwtstamps *hwtstamps); 2506 struct skb_shared_hwtstamps *hwtstamps);
2534 2507
2535static inline void sw_tx_timestamp(struct sk_buff *skb) 2508static inline void sw_tx_timestamp(struct sk_buff *skb)
2536{ 2509{
@@ -2562,8 +2535,8 @@ static inline void skb_tx_timestamp(struct sk_buff *skb)
2562 */ 2535 */
2563void skb_complete_wifi_ack(struct sk_buff *skb, bool acked); 2536void skb_complete_wifi_ack(struct sk_buff *skb, bool acked);
2564 2537
2565extern __sum16 __skb_checksum_complete_head(struct sk_buff *skb, int len); 2538__sum16 __skb_checksum_complete_head(struct sk_buff *skb, int len);
2566extern __sum16 __skb_checksum_complete(struct sk_buff *skb); 2539__sum16 __skb_checksum_complete(struct sk_buff *skb);
2567 2540
2568static inline int skb_csum_unnecessary(const struct sk_buff *skb) 2541static inline int skb_csum_unnecessary(const struct sk_buff *skb)
2569{ 2542{
@@ -2593,7 +2566,7 @@ static inline __sum16 skb_checksum_complete(struct sk_buff *skb)
2593} 2566}
2594 2567
2595#if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE) 2568#if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE)
2596extern void nf_conntrack_destroy(struct nf_conntrack *nfct); 2569void nf_conntrack_destroy(struct nf_conntrack *nfct);
2597static inline void nf_conntrack_put(struct nf_conntrack *nfct) 2570static inline void nf_conntrack_put(struct nf_conntrack *nfct)
2598{ 2571{
2599 if (nfct && atomic_dec_and_test(&nfct->use)) 2572 if (nfct && atomic_dec_and_test(&nfct->use))
@@ -2732,9 +2705,8 @@ static inline bool skb_rx_queue_recorded(const struct sk_buff *skb)
2732 return skb->queue_mapping != 0; 2705 return skb->queue_mapping != 0;
2733} 2706}
2734 2707
2735extern u16 __skb_tx_hash(const struct net_device *dev, 2708u16 __skb_tx_hash(const struct net_device *dev, const struct sk_buff *skb,
2736 const struct sk_buff *skb, 2709 unsigned int num_tx_queues);
2737 unsigned int num_tx_queues);
2738 2710
2739#ifdef CONFIG_XFRM 2711#ifdef CONFIG_XFRM
2740static inline struct sec_path *skb_sec_path(struct sk_buff *skb) 2712static inline struct sec_path *skb_sec_path(struct sk_buff *skb)
@@ -2788,7 +2760,7 @@ static inline bool skb_is_gso_v6(const struct sk_buff *skb)
2788 return skb_shinfo(skb)->gso_type & SKB_GSO_TCPV6; 2760 return skb_shinfo(skb)->gso_type & SKB_GSO_TCPV6;
2789} 2761}
2790 2762
2791extern void __skb_warn_lro_forwarding(const struct sk_buff *skb); 2763void __skb_warn_lro_forwarding(const struct sk_buff *skb);
2792 2764
2793static inline bool skb_warn_if_lro(const struct sk_buff *skb) 2765static inline bool skb_warn_if_lro(const struct sk_buff *skb)
2794{ 2766{