diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2011-11-22 05:57:41 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-11-22 16:43:32 -0500 |
commit | 1f2149c1df50c8c712950872675f46e6e44629f0 (patch) | |
tree | a33a556696e27611b6b38cdcbb6de9315f483bd4 /include/linux/skbuff.h | |
parent | 84b405011166e663fe9ef56c29b1d76f59b35568 (diff) |
net: remove netdev_alloc_page and use __GFP_COLD
Given we dont use anymore the struct net_device *dev argument, and this
interface brings litle benefit, remove netdev_{alloc|free}_page(), to
debloat include/linux/skbuff.h a bit.
(Some drivers used a mix of these interfaces and alloc_pages())
When allocating a page given to device for DMA transfer (device to
memory), it makes sense to use a cold one (__GFP_COLD)
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
CC: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
CC: Dimitris Michailidis <dm@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/skbuff.h')
-rw-r--r-- | include/linux/skbuff.h | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 09b7ea566d66..cec0657d0d32 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -1669,38 +1669,6 @@ static inline struct sk_buff *netdev_alloc_skb_ip_align(struct net_device *dev, | |||
1669 | } | 1669 | } |
1670 | 1670 | ||
1671 | /** | 1671 | /** |
1672 | * __netdev_alloc_page - allocate a page for ps-rx on a specific device | ||
1673 | * @dev: network device to receive on | ||
1674 | * @gfp_mask: alloc_pages_node mask | ||
1675 | * | ||
1676 | * Allocate a new page. dev currently unused. | ||
1677 | * | ||
1678 | * %NULL is returned if there is no free memory. | ||
1679 | */ | ||
1680 | static inline struct page *__netdev_alloc_page(struct net_device *dev, gfp_t gfp_mask) | ||
1681 | { | ||
1682 | return alloc_pages_node(NUMA_NO_NODE, gfp_mask, 0); | ||
1683 | } | ||
1684 | |||
1685 | /** | ||
1686 | * netdev_alloc_page - allocate a page for ps-rx on a specific device | ||
1687 | * @dev: network device to receive on | ||
1688 | * | ||
1689 | * Allocate a new page. dev currently unused. | ||
1690 | * | ||
1691 | * %NULL is returned if there is no free memory. | ||
1692 | */ | ||
1693 | static inline struct page *netdev_alloc_page(struct net_device *dev) | ||
1694 | { | ||
1695 | return __netdev_alloc_page(dev, GFP_ATOMIC); | ||
1696 | } | ||
1697 | |||
1698 | static inline void netdev_free_page(struct net_device *dev, struct page *page) | ||
1699 | { | ||
1700 | __free_page(page); | ||
1701 | } | ||
1702 | |||
1703 | /** | ||
1704 | * skb_frag_page - retrieve the page refered to by a paged fragment | 1672 | * skb_frag_page - retrieve the page refered to by a paged fragment |
1705 | * @frag: the paged fragment | 1673 | * @frag: the paged fragment |
1706 | * | 1674 | * |