aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/skbuff.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2009-02-10 05:09:24 -0500
committerDavid S. Miller <davem@davemloft.net>2009-02-10 05:09:24 -0500
commitb4ac530fc3af02a004729043dacf6b6330b46892 (patch)
tree523b74d0ee83ed1b3f7e6ace0d56dbeb918ad43c /net/core/skbuff.c
parente4e90b210dbe8253aaf519ee6efaaab7b2b92034 (diff)
net: Move skbuff symbol exports after each symbol's definition.
net/core/skbuff.c is a hodge-podge of symbol export placement. Some of the exports are right after the definition of the symbol being exported, others are clumped together into a big group at the end of the file. Make things consistent. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/skbuff.c')
-rw-r--r--net/core/skbuff.c79
1 files changed, 36 insertions, 43 deletions
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index 67f2a2f85827..7657cec5973d 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -123,6 +123,7 @@ void skb_over_panic(struct sk_buff *skb, int sz, void *here)
123 skb->dev ? skb->dev->name : "<NULL>"); 123 skb->dev ? skb->dev->name : "<NULL>");
124 BUG(); 124 BUG();
125} 125}
126EXPORT_SYMBOL(skb_over_panic);
126 127
127/** 128/**
128 * skb_under_panic - private function 129 * skb_under_panic - private function
@@ -142,6 +143,7 @@ void skb_under_panic(struct sk_buff *skb, int sz, void *here)
142 skb->dev ? skb->dev->name : "<NULL>"); 143 skb->dev ? skb->dev->name : "<NULL>");
143 BUG(); 144 BUG();
144} 145}
146EXPORT_SYMBOL(skb_under_panic);
145 147
146void skb_truesize_bug(struct sk_buff *skb) 148void skb_truesize_bug(struct sk_buff *skb)
147{ 149{
@@ -231,6 +233,7 @@ nodata:
231 skb = NULL; 233 skb = NULL;
232 goto out; 234 goto out;
233} 235}
236EXPORT_SYMBOL(__alloc_skb);
234 237
235/** 238/**
236 * __netdev_alloc_skb - allocate an skbuff for rx on a specific device 239 * __netdev_alloc_skb - allocate an skbuff for rx on a specific device
@@ -258,6 +261,7 @@ struct sk_buff *__netdev_alloc_skb(struct net_device *dev,
258 } 261 }
259 return skb; 262 return skb;
260} 263}
264EXPORT_SYMBOL(__netdev_alloc_skb);
261 265
262struct page *__netdev_alloc_page(struct net_device *dev, gfp_t gfp_mask) 266struct page *__netdev_alloc_page(struct net_device *dev, gfp_t gfp_mask)
263{ 267{
@@ -426,6 +430,7 @@ void __kfree_skb(struct sk_buff *skb)
426 skb_release_all(skb); 430 skb_release_all(skb);
427 kfree_skbmem(skb); 431 kfree_skbmem(skb);
428} 432}
433EXPORT_SYMBOL(__kfree_skb);
429 434
430/** 435/**
431 * kfree_skb - free an sk_buff 436 * kfree_skb - free an sk_buff
@@ -444,6 +449,7 @@ void kfree_skb(struct sk_buff *skb)
444 return; 449 return;
445 __kfree_skb(skb); 450 __kfree_skb(skb);
446} 451}
452EXPORT_SYMBOL(kfree_skb);
447 453
448/** 454/**
449 * skb_recycle_check - check if skb can be reused for receive 455 * skb_recycle_check - check if skb can be reused for receive
@@ -613,6 +619,7 @@ struct sk_buff *skb_clone(struct sk_buff *skb, gfp_t gfp_mask)
613 619
614 return __skb_clone(n, skb); 620 return __skb_clone(n, skb);
615} 621}
622EXPORT_SYMBOL(skb_clone);
616 623
617static void copy_skb_header(struct sk_buff *new, const struct sk_buff *old) 624static void copy_skb_header(struct sk_buff *new, const struct sk_buff *old)
618{ 625{
@@ -679,7 +686,7 @@ struct sk_buff *skb_copy(const struct sk_buff *skb, gfp_t gfp_mask)
679 copy_skb_header(n, skb); 686 copy_skb_header(n, skb);
680 return n; 687 return n;
681} 688}
682 689EXPORT_SYMBOL(skb_copy);
683 690
684/** 691/**
685 * pskb_copy - create copy of an sk_buff with private head. 692 * pskb_copy - create copy of an sk_buff with private head.
@@ -738,6 +745,7 @@ struct sk_buff *pskb_copy(struct sk_buff *skb, gfp_t gfp_mask)
738out: 745out:
739 return n; 746 return n;
740} 747}
748EXPORT_SYMBOL(pskb_copy);
741 749
742/** 750/**
743 * pskb_expand_head - reallocate header of &sk_buff 751 * pskb_expand_head - reallocate header of &sk_buff
@@ -821,6 +829,7 @@ int pskb_expand_head(struct sk_buff *skb, int nhead, int ntail,
821nodata: 829nodata:
822 return -ENOMEM; 830 return -ENOMEM;
823} 831}
832EXPORT_SYMBOL(pskb_expand_head);
824 833
825/* Make private copy of skb with writable head and some headroom */ 834/* Make private copy of skb with writable head and some headroom */
826 835
@@ -841,7 +850,7 @@ struct sk_buff *skb_realloc_headroom(struct sk_buff *skb, unsigned int headroom)
841 } 850 }
842 return skb2; 851 return skb2;
843} 852}
844 853EXPORT_SYMBOL(skb_realloc_headroom);
845 854
846/** 855/**
847 * skb_copy_expand - copy and expand sk_buff 856 * skb_copy_expand - copy and expand sk_buff
@@ -906,6 +915,7 @@ struct sk_buff *skb_copy_expand(const struct sk_buff *skb,
906 915
907 return n; 916 return n;
908} 917}
918EXPORT_SYMBOL(skb_copy_expand);
909 919
910/** 920/**
911 * skb_pad - zero pad the tail of an skb 921 * skb_pad - zero pad the tail of an skb
@@ -951,6 +961,7 @@ free_skb:
951 kfree_skb(skb); 961 kfree_skb(skb);
952 return err; 962 return err;
953} 963}
964EXPORT_SYMBOL(skb_pad);
954 965
955/** 966/**
956 * skb_put - add data to a buffer 967 * skb_put - add data to a buffer
@@ -1108,6 +1119,7 @@ done:
1108 1119
1109 return 0; 1120 return 0;
1110} 1121}
1122EXPORT_SYMBOL(___pskb_trim);
1111 1123
1112/** 1124/**
1113 * __pskb_pull_tail - advance tail of skb header 1125 * __pskb_pull_tail - advance tail of skb header
@@ -1246,6 +1258,7 @@ pull_pages:
1246 1258
1247 return skb_tail_pointer(skb); 1259 return skb_tail_pointer(skb);
1248} 1260}
1261EXPORT_SYMBOL(__pskb_pull_tail);
1249 1262
1250/* Copy some data bits from skb to kernel buffer. */ 1263/* Copy some data bits from skb to kernel buffer. */
1251 1264
@@ -1323,6 +1336,7 @@ int skb_copy_bits(const struct sk_buff *skb, int offset, void *to, int len)
1323fault: 1336fault:
1324 return -EFAULT; 1337 return -EFAULT;
1325} 1338}
1339EXPORT_SYMBOL(skb_copy_bits);
1326 1340
1327/* 1341/*
1328 * Callback from splice_to_pipe(), if we need to release some pages 1342 * Callback from splice_to_pipe(), if we need to release some pages
@@ -1623,7 +1637,6 @@ int skb_store_bits(struct sk_buff *skb, int offset, const void *from, int len)
1623fault: 1637fault:
1624 return -EFAULT; 1638 return -EFAULT;
1625} 1639}
1626
1627EXPORT_SYMBOL(skb_store_bits); 1640EXPORT_SYMBOL(skb_store_bits);
1628 1641
1629/* Checksum skb data. */ 1642/* Checksum skb data. */
@@ -1700,6 +1713,7 @@ __wsum skb_checksum(const struct sk_buff *skb, int offset,
1700 1713
1701 return csum; 1714 return csum;
1702} 1715}
1716EXPORT_SYMBOL(skb_checksum);
1703 1717
1704/* Both of above in one bottle. */ 1718/* Both of above in one bottle. */
1705 1719
@@ -1781,6 +1795,7 @@ __wsum skb_copy_and_csum_bits(const struct sk_buff *skb, int offset,
1781 BUG_ON(len); 1795 BUG_ON(len);
1782 return csum; 1796 return csum;
1783} 1797}
1798EXPORT_SYMBOL(skb_copy_and_csum_bits);
1784 1799
1785void skb_copy_and_csum_dev(const struct sk_buff *skb, u8 *to) 1800void skb_copy_and_csum_dev(const struct sk_buff *skb, u8 *to)
1786{ 1801{
@@ -1807,6 +1822,7 @@ void skb_copy_and_csum_dev(const struct sk_buff *skb, u8 *to)
1807 *((__sum16 *)(to + csstuff)) = csum_fold(csum); 1822 *((__sum16 *)(to + csstuff)) = csum_fold(csum);
1808 } 1823 }
1809} 1824}
1825EXPORT_SYMBOL(skb_copy_and_csum_dev);
1810 1826
1811/** 1827/**
1812 * skb_dequeue - remove from the head of the queue 1828 * skb_dequeue - remove from the head of the queue
@@ -1827,6 +1843,7 @@ struct sk_buff *skb_dequeue(struct sk_buff_head *list)
1827 spin_unlock_irqrestore(&list->lock, flags); 1843 spin_unlock_irqrestore(&list->lock, flags);
1828 return result; 1844 return result;
1829} 1845}
1846EXPORT_SYMBOL(skb_dequeue);
1830 1847
1831/** 1848/**
1832 * skb_dequeue_tail - remove from the tail of the queue 1849 * skb_dequeue_tail - remove from the tail of the queue
@@ -1846,6 +1863,7 @@ struct sk_buff *skb_dequeue_tail(struct sk_buff_head *list)
1846 spin_unlock_irqrestore(&list->lock, flags); 1863 spin_unlock_irqrestore(&list->lock, flags);
1847 return result; 1864 return result;
1848} 1865}
1866EXPORT_SYMBOL(skb_dequeue_tail);
1849 1867
1850/** 1868/**
1851 * skb_queue_purge - empty a list 1869 * skb_queue_purge - empty a list
@@ -1861,6 +1879,7 @@ void skb_queue_purge(struct sk_buff_head *list)
1861 while ((skb = skb_dequeue(list)) != NULL) 1879 while ((skb = skb_dequeue(list)) != NULL)
1862 kfree_skb(skb); 1880 kfree_skb(skb);
1863} 1881}
1882EXPORT_SYMBOL(skb_queue_purge);
1864 1883
1865/** 1884/**
1866 * skb_queue_head - queue a buffer at the list head 1885 * skb_queue_head - queue a buffer at the list head
@@ -1881,6 +1900,7 @@ void skb_queue_head(struct sk_buff_head *list, struct sk_buff *newsk)
1881 __skb_queue_head(list, newsk); 1900 __skb_queue_head(list, newsk);
1882 spin_unlock_irqrestore(&list->lock, flags); 1901 spin_unlock_irqrestore(&list->lock, flags);
1883} 1902}
1903EXPORT_SYMBOL(skb_queue_head);
1884 1904
1885/** 1905/**
1886 * skb_queue_tail - queue a buffer at the list tail 1906 * skb_queue_tail - queue a buffer at the list tail
@@ -1901,6 +1921,7 @@ void skb_queue_tail(struct sk_buff_head *list, struct sk_buff *newsk)
1901 __skb_queue_tail(list, newsk); 1921 __skb_queue_tail(list, newsk);
1902 spin_unlock_irqrestore(&list->lock, flags); 1922 spin_unlock_irqrestore(&list->lock, flags);
1903} 1923}
1924EXPORT_SYMBOL(skb_queue_tail);
1904 1925
1905/** 1926/**
1906 * skb_unlink - remove a buffer from a list 1927 * skb_unlink - remove a buffer from a list
@@ -1920,6 +1941,7 @@ void skb_unlink(struct sk_buff *skb, struct sk_buff_head *list)
1920 __skb_unlink(skb, list); 1941 __skb_unlink(skb, list);
1921 spin_unlock_irqrestore(&list->lock, flags); 1942 spin_unlock_irqrestore(&list->lock, flags);
1922} 1943}
1944EXPORT_SYMBOL(skb_unlink);
1923 1945
1924/** 1946/**
1925 * skb_append - append a buffer 1947 * skb_append - append a buffer
@@ -1939,7 +1961,7 @@ void skb_append(struct sk_buff *old, struct sk_buff *newsk, struct sk_buff_head
1939 __skb_queue_after(list, old, newsk); 1961 __skb_queue_after(list, old, newsk);
1940 spin_unlock_irqrestore(&list->lock, flags); 1962 spin_unlock_irqrestore(&list->lock, flags);
1941} 1963}
1942 1964EXPORT_SYMBOL(skb_append);
1943 1965
1944/** 1966/**
1945 * skb_insert - insert a buffer 1967 * skb_insert - insert a buffer
@@ -1961,6 +1983,7 @@ void skb_insert(struct sk_buff *old, struct sk_buff *newsk, struct sk_buff_head
1961 __skb_insert(newsk, old->prev, old, list); 1983 __skb_insert(newsk, old->prev, old, list);
1962 spin_unlock_irqrestore(&list->lock, flags); 1984 spin_unlock_irqrestore(&list->lock, flags);
1963} 1985}
1986EXPORT_SYMBOL(skb_insert);
1964 1987
1965static inline void skb_split_inside_header(struct sk_buff *skb, 1988static inline void skb_split_inside_header(struct sk_buff *skb,
1966 struct sk_buff* skb1, 1989 struct sk_buff* skb1,
@@ -2039,6 +2062,7 @@ void skb_split(struct sk_buff *skb, struct sk_buff *skb1, const u32 len)
2039 else /* Second chunk has no header, nothing to copy. */ 2062 else /* Second chunk has no header, nothing to copy. */
2040 skb_split_no_header(skb, skb1, len, pos); 2063 skb_split_no_header(skb, skb1, len, pos);
2041} 2064}
2065EXPORT_SYMBOL(skb_split);
2042 2066
2043/* Shifting from/to a cloned skb is a no-go. 2067/* Shifting from/to a cloned skb is a no-go.
2044 * 2068 *
@@ -2201,6 +2225,7 @@ void skb_prepare_seq_read(struct sk_buff *skb, unsigned int from,
2201 st->frag_idx = st->stepped_offset = 0; 2225 st->frag_idx = st->stepped_offset = 0;
2202 st->frag_data = NULL; 2226 st->frag_data = NULL;
2203} 2227}
2228EXPORT_SYMBOL(skb_prepare_seq_read);
2204 2229
2205/** 2230/**
2206 * skb_seq_read - Sequentially read skb data 2231 * skb_seq_read - Sequentially read skb data
@@ -2288,6 +2313,7 @@ next_skb:
2288 2313
2289 return 0; 2314 return 0;
2290} 2315}
2316EXPORT_SYMBOL(skb_seq_read);
2291 2317
2292/** 2318/**
2293 * skb_abort_seq_read - Abort a sequential read of skb data 2319 * skb_abort_seq_read - Abort a sequential read of skb data
@@ -2301,6 +2327,7 @@ void skb_abort_seq_read(struct skb_seq_state *st)
2301 if (st->frag_data) 2327 if (st->frag_data)
2302 kunmap_skb_frag(st->frag_data); 2328 kunmap_skb_frag(st->frag_data);
2303} 2329}
2330EXPORT_SYMBOL(skb_abort_seq_read);
2304 2331
2305#define TS_SKB_CB(state) ((struct skb_seq_state *) &((state)->cb)) 2332#define TS_SKB_CB(state) ((struct skb_seq_state *) &((state)->cb))
2306 2333
@@ -2343,6 +2370,7 @@ unsigned int skb_find_text(struct sk_buff *skb, unsigned int from,
2343 ret = textsearch_find(config, state); 2370 ret = textsearch_find(config, state);
2344 return (ret <= to - from ? ret : UINT_MAX); 2371 return (ret <= to - from ? ret : UINT_MAX);
2345} 2372}
2373EXPORT_SYMBOL(skb_find_text);
2346 2374
2347/** 2375/**
2348 * skb_append_datato_frags: - append the user data to a skb 2376 * skb_append_datato_frags: - append the user data to a skb
@@ -2415,6 +2443,7 @@ int skb_append_datato_frags(struct sock *sk, struct sk_buff *skb,
2415 2443
2416 return 0; 2444 return 0;
2417} 2445}
2446EXPORT_SYMBOL(skb_append_datato_frags);
2418 2447
2419/** 2448/**
2420 * skb_pull_rcsum - pull skb and update receive checksum 2449 * skb_pull_rcsum - pull skb and update receive checksum
@@ -2602,7 +2631,6 @@ err:
2602 } 2631 }
2603 return ERR_PTR(err); 2632 return ERR_PTR(err);
2604} 2633}
2605
2606EXPORT_SYMBOL_GPL(skb_segment); 2634EXPORT_SYMBOL_GPL(skb_segment);
2607 2635
2608int skb_gro_receive(struct sk_buff **head, struct sk_buff *skb) 2636int skb_gro_receive(struct sk_buff **head, struct sk_buff *skb)
@@ -2800,6 +2828,7 @@ int skb_to_sgvec(struct sk_buff *skb, struct scatterlist *sg, int offset, int le
2800 2828
2801 return nsg; 2829 return nsg;
2802} 2830}
2831EXPORT_SYMBOL_GPL(skb_to_sgvec);
2803 2832
2804/** 2833/**
2805 * skb_cow_data - Check that a socket buffer's data buffers are writable 2834 * skb_cow_data - Check that a socket buffer's data buffers are writable
@@ -2909,6 +2938,7 @@ int skb_cow_data(struct sk_buff *skb, int tailbits, struct sk_buff **trailer)
2909 2938
2910 return elt; 2939 return elt;
2911} 2940}
2941EXPORT_SYMBOL_GPL(skb_cow_data);
2912 2942
2913/** 2943/**
2914 * skb_partial_csum_set - set up and verify partial csum values for packet 2944 * skb_partial_csum_set - set up and verify partial csum values for packet
@@ -2937,6 +2967,7 @@ bool skb_partial_csum_set(struct sk_buff *skb, u16 start, u16 off)
2937 skb->csum_offset = off; 2967 skb->csum_offset = off;
2938 return true; 2968 return true;
2939} 2969}
2970EXPORT_SYMBOL_GPL(skb_partial_csum_set);
2940 2971
2941void __skb_warn_lro_forwarding(const struct sk_buff *skb) 2972void __skb_warn_lro_forwarding(const struct sk_buff *skb)
2942{ 2973{
@@ -2944,42 +2975,4 @@ void __skb_warn_lro_forwarding(const struct sk_buff *skb)
2944 pr_warning("%s: received packets cannot be forwarded" 2975 pr_warning("%s: received packets cannot be forwarded"
2945 " while LRO is enabled\n", skb->dev->name); 2976 " while LRO is enabled\n", skb->dev->name);
2946} 2977}
2947
2948EXPORT_SYMBOL(___pskb_trim);
2949EXPORT_SYMBOL(__kfree_skb);
2950EXPORT_SYMBOL(kfree_skb);
2951EXPORT_SYMBOL(__pskb_pull_tail);
2952EXPORT_SYMBOL(__alloc_skb);
2953EXPORT_SYMBOL(__netdev_alloc_skb);
2954EXPORT_SYMBOL(pskb_copy);
2955EXPORT_SYMBOL(pskb_expand_head);
2956EXPORT_SYMBOL(skb_checksum);
2957EXPORT_SYMBOL(skb_clone);
2958EXPORT_SYMBOL(skb_copy);
2959EXPORT_SYMBOL(skb_copy_and_csum_bits);
2960EXPORT_SYMBOL(skb_copy_and_csum_dev);
2961EXPORT_SYMBOL(skb_copy_bits);
2962EXPORT_SYMBOL(skb_copy_expand);
2963EXPORT_SYMBOL(skb_over_panic);
2964EXPORT_SYMBOL(skb_pad);
2965EXPORT_SYMBOL(skb_realloc_headroom);
2966EXPORT_SYMBOL(skb_under_panic);
2967EXPORT_SYMBOL(skb_dequeue);
2968EXPORT_SYMBOL(skb_dequeue_tail);
2969EXPORT_SYMBOL(skb_insert);
2970EXPORT_SYMBOL(skb_queue_purge);
2971EXPORT_SYMBOL(skb_queue_head);
2972EXPORT_SYMBOL(skb_queue_tail);
2973EXPORT_SYMBOL(skb_unlink);
2974EXPORT_SYMBOL(skb_append);
2975EXPORT_SYMBOL(skb_split);
2976EXPORT_SYMBOL(skb_prepare_seq_read);
2977EXPORT_SYMBOL(skb_seq_read);
2978EXPORT_SYMBOL(skb_abort_seq_read);
2979EXPORT_SYMBOL(skb_find_text);
2980EXPORT_SYMBOL(skb_append_datato_frags);
2981EXPORT_SYMBOL(__skb_warn_lro_forwarding); 2978EXPORT_SYMBOL(__skb_warn_lro_forwarding);
2982
2983EXPORT_SYMBOL_GPL(skb_to_sgvec);
2984EXPORT_SYMBOL_GPL(skb_cow_data);
2985EXPORT_SYMBOL_GPL(skb_partial_csum_set);