Commit b4ac530f authored by David S. Miller's avatar David S. Miller

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: default avatarDavid S. Miller <davem@davemloft.net>
parent e4e90b21
...@@ -123,6 +123,7 @@ void skb_over_panic(struct sk_buff *skb, int sz, void *here) ...@@ -123,6 +123,7 @@ void skb_over_panic(struct sk_buff *skb, int sz, void *here)
skb->dev ? skb->dev->name : "<NULL>"); skb->dev ? skb->dev->name : "<NULL>");
BUG(); BUG();
} }
EXPORT_SYMBOL(skb_over_panic);
/** /**
* skb_under_panic - private function * skb_under_panic - private function
...@@ -142,6 +143,7 @@ void skb_under_panic(struct sk_buff *skb, int sz, void *here) ...@@ -142,6 +143,7 @@ void skb_under_panic(struct sk_buff *skb, int sz, void *here)
skb->dev ? skb->dev->name : "<NULL>"); skb->dev ? skb->dev->name : "<NULL>");
BUG(); BUG();
} }
EXPORT_SYMBOL(skb_under_panic);
void skb_truesize_bug(struct sk_buff *skb) void skb_truesize_bug(struct sk_buff *skb)
{ {
...@@ -231,6 +233,7 @@ struct sk_buff *__alloc_skb(unsigned int size, gfp_t gfp_mask, ...@@ -231,6 +233,7 @@ struct sk_buff *__alloc_skb(unsigned int size, gfp_t gfp_mask,
skb = NULL; skb = NULL;
goto out; goto out;
} }
EXPORT_SYMBOL(__alloc_skb);
/** /**
* __netdev_alloc_skb - allocate an skbuff for rx on a specific device * __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,6 +261,7 @@ struct sk_buff *__netdev_alloc_skb(struct net_device *dev,
} }
return skb; return skb;
} }
EXPORT_SYMBOL(__netdev_alloc_skb);
struct page *__netdev_alloc_page(struct net_device *dev, gfp_t gfp_mask) struct page *__netdev_alloc_page(struct net_device *dev, gfp_t gfp_mask)
{ {
...@@ -426,6 +430,7 @@ void __kfree_skb(struct sk_buff *skb) ...@@ -426,6 +430,7 @@ void __kfree_skb(struct sk_buff *skb)
skb_release_all(skb); skb_release_all(skb);
kfree_skbmem(skb); kfree_skbmem(skb);
} }
EXPORT_SYMBOL(__kfree_skb);
/** /**
* kfree_skb - free an sk_buff * kfree_skb - free an sk_buff
...@@ -444,6 +449,7 @@ void kfree_skb(struct sk_buff *skb) ...@@ -444,6 +449,7 @@ void kfree_skb(struct sk_buff *skb)
return; return;
__kfree_skb(skb); __kfree_skb(skb);
} }
EXPORT_SYMBOL(kfree_skb);
/** /**
* skb_recycle_check - check if skb can be reused for receive * 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,6 +619,7 @@ struct sk_buff *skb_clone(struct sk_buff *skb, gfp_t gfp_mask)
return __skb_clone(n, skb); return __skb_clone(n, skb);
} }
EXPORT_SYMBOL(skb_clone);
static void copy_skb_header(struct sk_buff *new, const struct sk_buff *old) static void copy_skb_header(struct sk_buff *new, const struct sk_buff *old)
{ {
...@@ -679,7 +686,7 @@ struct sk_buff *skb_copy(const struct sk_buff *skb, gfp_t gfp_mask) ...@@ -679,7 +686,7 @@ struct sk_buff *skb_copy(const struct sk_buff *skb, gfp_t gfp_mask)
copy_skb_header(n, skb); copy_skb_header(n, skb);
return n; return n;
} }
EXPORT_SYMBOL(skb_copy);
/** /**
* pskb_copy - create copy of an sk_buff with private head. * 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) ...@@ -738,6 +745,7 @@ struct sk_buff *pskb_copy(struct sk_buff *skb, gfp_t gfp_mask)
out: out:
return n; return n;
} }
EXPORT_SYMBOL(pskb_copy);
/** /**
* pskb_expand_head - reallocate header of &sk_buff * pskb_expand_head - reallocate header of &sk_buff
...@@ -821,6 +829,7 @@ int pskb_expand_head(struct sk_buff *skb, int nhead, int ntail, ...@@ -821,6 +829,7 @@ int pskb_expand_head(struct sk_buff *skb, int nhead, int ntail,
nodata: nodata:
return -ENOMEM; return -ENOMEM;
} }
EXPORT_SYMBOL(pskb_expand_head);
/* Make private copy of skb with writable head and some headroom */ /* Make private copy of skb with writable head and some headroom */
...@@ -841,7 +850,7 @@ struct sk_buff *skb_realloc_headroom(struct sk_buff *skb, unsigned int headroom) ...@@ -841,7 +850,7 @@ struct sk_buff *skb_realloc_headroom(struct sk_buff *skb, unsigned int headroom)
} }
return skb2; return skb2;
} }
EXPORT_SYMBOL(skb_realloc_headroom);
/** /**
* skb_copy_expand - copy and expand sk_buff * skb_copy_expand - copy and expand sk_buff
...@@ -906,6 +915,7 @@ struct sk_buff *skb_copy_expand(const struct sk_buff *skb, ...@@ -906,6 +915,7 @@ struct sk_buff *skb_copy_expand(const struct sk_buff *skb,
return n; return n;
} }
EXPORT_SYMBOL(skb_copy_expand);
/** /**
* skb_pad - zero pad the tail of an skb * skb_pad - zero pad the tail of an skb
...@@ -951,6 +961,7 @@ int skb_pad(struct sk_buff *skb, int pad) ...@@ -951,6 +961,7 @@ int skb_pad(struct sk_buff *skb, int pad)
kfree_skb(skb); kfree_skb(skb);
return err; return err;
} }
EXPORT_SYMBOL(skb_pad);
/** /**
* skb_put - add data to a buffer * skb_put - add data to a buffer
...@@ -1108,6 +1119,7 @@ int ___pskb_trim(struct sk_buff *skb, unsigned int len) ...@@ -1108,6 +1119,7 @@ int ___pskb_trim(struct sk_buff *skb, unsigned int len)
return 0; return 0;
} }
EXPORT_SYMBOL(___pskb_trim);
/** /**
* __pskb_pull_tail - advance tail of skb header * __pskb_pull_tail - advance tail of skb header
...@@ -1246,6 +1258,7 @@ unsigned char *__pskb_pull_tail(struct sk_buff *skb, int delta) ...@@ -1246,6 +1258,7 @@ unsigned char *__pskb_pull_tail(struct sk_buff *skb, int delta)
return skb_tail_pointer(skb); return skb_tail_pointer(skb);
} }
EXPORT_SYMBOL(__pskb_pull_tail);
/* Copy some data bits from skb to kernel buffer. */ /* Copy some data bits from skb to kernel buffer. */
...@@ -1323,6 +1336,7 @@ int skb_copy_bits(const struct sk_buff *skb, int offset, void *to, int len) ...@@ -1323,6 +1336,7 @@ int skb_copy_bits(const struct sk_buff *skb, int offset, void *to, int len)
fault: fault:
return -EFAULT; return -EFAULT;
} }
EXPORT_SYMBOL(skb_copy_bits);
/* /*
* Callback from splice_to_pipe(), if we need to release some pages * 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) ...@@ -1623,7 +1637,6 @@ int skb_store_bits(struct sk_buff *skb, int offset, const void *from, int len)
fault: fault:
return -EFAULT; return -EFAULT;
} }
EXPORT_SYMBOL(skb_store_bits); EXPORT_SYMBOL(skb_store_bits);
/* Checksum skb data. */ /* Checksum skb data. */
...@@ -1700,6 +1713,7 @@ __wsum skb_checksum(const struct sk_buff *skb, int offset, ...@@ -1700,6 +1713,7 @@ __wsum skb_checksum(const struct sk_buff *skb, int offset,
return csum; return csum;
} }
EXPORT_SYMBOL(skb_checksum);
/* Both of above in one bottle. */ /* Both of above in one bottle. */
...@@ -1781,6 +1795,7 @@ __wsum skb_copy_and_csum_bits(const struct sk_buff *skb, int offset, ...@@ -1781,6 +1795,7 @@ __wsum skb_copy_and_csum_bits(const struct sk_buff *skb, int offset,
BUG_ON(len); BUG_ON(len);
return csum; return csum;
} }
EXPORT_SYMBOL(skb_copy_and_csum_bits);
void skb_copy_and_csum_dev(const struct sk_buff *skb, u8 *to) void skb_copy_and_csum_dev(const struct sk_buff *skb, u8 *to)
{ {
...@@ -1807,6 +1822,7 @@ void skb_copy_and_csum_dev(const struct sk_buff *skb, u8 *to) ...@@ -1807,6 +1822,7 @@ void skb_copy_and_csum_dev(const struct sk_buff *skb, u8 *to)
*((__sum16 *)(to + csstuff)) = csum_fold(csum); *((__sum16 *)(to + csstuff)) = csum_fold(csum);
} }
} }
EXPORT_SYMBOL(skb_copy_and_csum_dev);
/** /**
* skb_dequeue - remove from the head of the queue * skb_dequeue - remove from the head of the queue
...@@ -1827,6 +1843,7 @@ struct sk_buff *skb_dequeue(struct sk_buff_head *list) ...@@ -1827,6 +1843,7 @@ struct sk_buff *skb_dequeue(struct sk_buff_head *list)
spin_unlock_irqrestore(&list->lock, flags); spin_unlock_irqrestore(&list->lock, flags);
return result; return result;
} }
EXPORT_SYMBOL(skb_dequeue);
/** /**
* skb_dequeue_tail - remove from the tail of the queue * 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,6 +1863,7 @@ struct sk_buff *skb_dequeue_tail(struct sk_buff_head *list)
spin_unlock_irqrestore(&list->lock, flags); spin_unlock_irqrestore(&list->lock, flags);
return result; return result;
} }
EXPORT_SYMBOL(skb_dequeue_tail);
/** /**
* skb_queue_purge - empty a list * skb_queue_purge - empty a list
...@@ -1861,6 +1879,7 @@ void skb_queue_purge(struct sk_buff_head *list) ...@@ -1861,6 +1879,7 @@ void skb_queue_purge(struct sk_buff_head *list)
while ((skb = skb_dequeue(list)) != NULL) while ((skb = skb_dequeue(list)) != NULL)
kfree_skb(skb); kfree_skb(skb);
} }
EXPORT_SYMBOL(skb_queue_purge);
/** /**
* skb_queue_head - queue a buffer at the list head * 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,6 +1900,7 @@ void skb_queue_head(struct sk_buff_head *list, struct sk_buff *newsk)
__skb_queue_head(list, newsk); __skb_queue_head(list, newsk);
spin_unlock_irqrestore(&list->lock, flags); spin_unlock_irqrestore(&list->lock, flags);
} }
EXPORT_SYMBOL(skb_queue_head);
/** /**
* skb_queue_tail - queue a buffer at the list tail * 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,6 +1921,7 @@ void skb_queue_tail(struct sk_buff_head *list, struct sk_buff *newsk)
__skb_queue_tail(list, newsk); __skb_queue_tail(list, newsk);
spin_unlock_irqrestore(&list->lock, flags); spin_unlock_irqrestore(&list->lock, flags);
} }
EXPORT_SYMBOL(skb_queue_tail);
/** /**
* skb_unlink - remove a buffer from a list * 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,6 +1941,7 @@ void skb_unlink(struct sk_buff *skb, struct sk_buff_head *list)
__skb_unlink(skb, list); __skb_unlink(skb, list);
spin_unlock_irqrestore(&list->lock, flags); spin_unlock_irqrestore(&list->lock, flags);
} }
EXPORT_SYMBOL(skb_unlink);
/** /**
* skb_append - append a buffer * 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,7 +1961,7 @@ void skb_append(struct sk_buff *old, struct sk_buff *newsk, struct sk_buff_head
__skb_queue_after(list, old, newsk); __skb_queue_after(list, old, newsk);
spin_unlock_irqrestore(&list->lock, flags); spin_unlock_irqrestore(&list->lock, flags);
} }
EXPORT_SYMBOL(skb_append);
/** /**
* skb_insert - insert a buffer * 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,6 +1983,7 @@ void skb_insert(struct sk_buff *old, struct sk_buff *newsk, struct sk_buff_head
__skb_insert(newsk, old->prev, old, list); __skb_insert(newsk, old->prev, old, list);
spin_unlock_irqrestore(&list->lock, flags); spin_unlock_irqrestore(&list->lock, flags);
} }
EXPORT_SYMBOL(skb_insert);
static inline void skb_split_inside_header(struct sk_buff *skb, static inline void skb_split_inside_header(struct sk_buff *skb,
struct sk_buff* skb1, struct sk_buff* skb1,
...@@ -2039,6 +2062,7 @@ void skb_split(struct sk_buff *skb, struct sk_buff *skb1, const u32 len) ...@@ -2039,6 +2062,7 @@ void skb_split(struct sk_buff *skb, struct sk_buff *skb1, const u32 len)
else /* Second chunk has no header, nothing to copy. */ else /* Second chunk has no header, nothing to copy. */
skb_split_no_header(skb, skb1, len, pos); skb_split_no_header(skb, skb1, len, pos);
} }
EXPORT_SYMBOL(skb_split);
/* Shifting from/to a cloned skb is a no-go. /* Shifting from/to a cloned skb is a no-go.
* *
...@@ -2201,6 +2225,7 @@ void skb_prepare_seq_read(struct sk_buff *skb, unsigned int from, ...@@ -2201,6 +2225,7 @@ void skb_prepare_seq_read(struct sk_buff *skb, unsigned int from,
st->frag_idx = st->stepped_offset = 0; st->frag_idx = st->stepped_offset = 0;
st->frag_data = NULL; st->frag_data = NULL;
} }
EXPORT_SYMBOL(skb_prepare_seq_read);
/** /**
* skb_seq_read - Sequentially read skb data * skb_seq_read - Sequentially read skb data
...@@ -2288,6 +2313,7 @@ unsigned int skb_seq_read(unsigned int consumed, const u8 **data, ...@@ -2288,6 +2313,7 @@ unsigned int skb_seq_read(unsigned int consumed, const u8 **data,
return 0; return 0;
} }
EXPORT_SYMBOL(skb_seq_read);
/** /**
* skb_abort_seq_read - Abort a sequential read of skb data * 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,6 +2327,7 @@ void skb_abort_seq_read(struct skb_seq_state *st)
if (st->frag_data) if (st->frag_data)
kunmap_skb_frag(st->frag_data); kunmap_skb_frag(st->frag_data);
} }
EXPORT_SYMBOL(skb_abort_seq_read);
#define TS_SKB_CB(state) ((struct skb_seq_state *) &((state)->cb)) #define TS_SKB_CB(state) ((struct skb_seq_state *) &((state)->cb))
...@@ -2343,6 +2370,7 @@ unsigned int skb_find_text(struct sk_buff *skb, unsigned int from, ...@@ -2343,6 +2370,7 @@ unsigned int skb_find_text(struct sk_buff *skb, unsigned int from,
ret = textsearch_find(config, state); ret = textsearch_find(config, state);
return (ret <= to - from ? ret : UINT_MAX); return (ret <= to - from ? ret : UINT_MAX);
} }
EXPORT_SYMBOL(skb_find_text);
/** /**
* skb_append_datato_frags: - append the user data to a skb * 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,6 +2443,7 @@ int skb_append_datato_frags(struct sock *sk, struct sk_buff *skb,
return 0; return 0;
} }
EXPORT_SYMBOL(skb_append_datato_frags);
/** /**
* skb_pull_rcsum - pull skb and update receive checksum * skb_pull_rcsum - pull skb and update receive checksum
...@@ -2602,7 +2631,6 @@ struct sk_buff *skb_segment(struct sk_buff *skb, int features) ...@@ -2602,7 +2631,6 @@ struct sk_buff *skb_segment(struct sk_buff *skb, int features)
} }
return ERR_PTR(err); return ERR_PTR(err);
} }
EXPORT_SYMBOL_GPL(skb_segment); EXPORT_SYMBOL_GPL(skb_segment);
int skb_gro_receive(struct sk_buff **head, struct sk_buff *skb) int 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,6 +2828,7 @@ int skb_to_sgvec(struct sk_buff *skb, struct scatterlist *sg, int offset, int le
return nsg; return nsg;
} }
EXPORT_SYMBOL_GPL(skb_to_sgvec);
/** /**
* skb_cow_data - Check that a socket buffer's data buffers are writable * 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,6 +2938,7 @@ int skb_cow_data(struct sk_buff *skb, int tailbits, struct sk_buff **trailer)
return elt; return elt;
} }
EXPORT_SYMBOL_GPL(skb_cow_data);
/** /**
* skb_partial_csum_set - set up and verify partial csum values for packet * 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,6 +2967,7 @@ bool skb_partial_csum_set(struct sk_buff *skb, u16 start, u16 off)
skb->csum_offset = off; skb->csum_offset = off;
return true; return true;
} }
EXPORT_SYMBOL_GPL(skb_partial_csum_set);
void __skb_warn_lro_forwarding(const struct sk_buff *skb) void __skb_warn_lro_forwarding(const struct sk_buff *skb)
{ {
...@@ -2944,42 +2975,4 @@ void __skb_warn_lro_forwarding(const struct sk_buff *skb) ...@@ -2944,42 +2975,4 @@ void __skb_warn_lro_forwarding(const struct sk_buff *skb)
pr_warning("%s: received packets cannot be forwarded" pr_warning("%s: received packets cannot be forwarded"
" while LRO is enabled\n", skb->dev->name); " while LRO is enabled\n", skb->dev->name);
} }
EXPORT_SYMBOL(___pskb_trim);
EXPORT_SYMBOL(__kfree_skb);
EXPORT_SYMBOL(kfree_skb);
EXPORT_SYMBOL(__pskb_pull_tail);
EXPORT_SYMBOL(__alloc_skb);
EXPORT_SYMBOL(__netdev_alloc_skb);
EXPORT_SYMBOL(pskb_copy);
EXPORT_SYMBOL(pskb_expand_head);
EXPORT_SYMBOL(skb_checksum);
EXPORT_SYMBOL(skb_clone);
EXPORT_SYMBOL(skb_copy);
EXPORT_SYMBOL(skb_copy_and_csum_bits);
EXPORT_SYMBOL(skb_copy_and_csum_dev);
EXPORT_SYMBOL(skb_copy_bits);
EXPORT_SYMBOL(skb_copy_expand);
EXPORT_SYMBOL(skb_over_panic);
EXPORT_SYMBOL(skb_pad);
EXPORT_SYMBOL(skb_realloc_headroom);
EXPORT_SYMBOL(skb_under_panic);
EXPORT_SYMBOL(skb_dequeue);
EXPORT_SYMBOL(skb_dequeue_tail);
EXPORT_SYMBOL(skb_insert);
EXPORT_SYMBOL(skb_queue_purge);
EXPORT_SYMBOL(skb_queue_head);
EXPORT_SYMBOL(skb_queue_tail);
EXPORT_SYMBOL(skb_unlink);
EXPORT_SYMBOL(skb_append);
EXPORT_SYMBOL(skb_split);
EXPORT_SYMBOL(skb_prepare_seq_read);
EXPORT_SYMBOL(skb_seq_read);
EXPORT_SYMBOL(skb_abort_seq_read);
EXPORT_SYMBOL(skb_find_text);
EXPORT_SYMBOL(skb_append_datato_frags);
EXPORT_SYMBOL(__skb_warn_lro_forwarding); EXPORT_SYMBOL(__skb_warn_lro_forwarding);
EXPORT_SYMBOL_GPL(skb_to_sgvec);
EXPORT_SYMBOL_GPL(skb_cow_data);
EXPORT_SYMBOL_GPL(skb_partial_csum_set);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment