Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 215167
b: refs/heads/master
c: 564824b
h: refs/heads/master
i:
  215165: f7cc9e1
  215163: 30fd6af
  215159: 2d8d3bf
  215151: baffe7a
  215135: a117598
  215103: 6622945
  215039: 452be46
v: v3
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Oct 16, 2010
1 parent 062a7e1 commit 0d8c891
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 17 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6f0333b8fde44b8c04a53b2461504f0e8f1cebe6
refs/heads/master: 564824b0c52c34692d804bb6ea214451615b0b50
20 changes: 16 additions & 4 deletions trunk/include/linux/skbuff.h
Original file line number Diff line number Diff line change
Expand Up @@ -496,13 +496,13 @@ extern struct sk_buff *__alloc_skb(unsigned int size,
static inline struct sk_buff *alloc_skb(unsigned int size,
gfp_t priority)
{
return __alloc_skb(size, priority, 0, -1);
return __alloc_skb(size, priority, 0, NUMA_NO_NODE);
}

static inline struct sk_buff *alloc_skb_fclone(unsigned int size,
gfp_t priority)
{
return __alloc_skb(size, priority, 1, -1);
return __alloc_skb(size, priority, 1, NUMA_NO_NODE);
}

extern bool skb_recycle_check(struct sk_buff *skb, int skb_size);
Expand Down Expand Up @@ -1563,13 +1563,25 @@ static inline struct sk_buff *netdev_alloc_skb_ip_align(struct net_device *dev,
return skb;
}

extern struct page *__netdev_alloc_page(struct net_device *dev, gfp_t gfp_mask);
/**
* __netdev_alloc_page - allocate a page for ps-rx on a specific device
* @dev: network device to receive on
* @gfp_mask: alloc_pages_node mask
*
* Allocate a new page. dev currently unused.
*
* %NULL is returned if there is no free memory.
*/
static inline struct page *__netdev_alloc_page(struct net_device *dev, gfp_t gfp_mask)
{
return alloc_pages_node(NUMA_NO_NODE, gfp_mask, 0);
}

/**
* netdev_alloc_page - allocate a page for ps-rx on a specific device
* @dev: network device to receive on
*
* Allocate a new page node local to the specified device.
* Allocate a new page. dev currently unused.
*
* %NULL is returned if there is no free memory.
*/
Expand Down
13 changes: 1 addition & 12 deletions trunk/net/core/skbuff.c
Original file line number Diff line number Diff line change
Expand Up @@ -247,10 +247,9 @@ EXPORT_SYMBOL(__alloc_skb);
struct sk_buff *__netdev_alloc_skb(struct net_device *dev,
unsigned int length, gfp_t gfp_mask)
{
int node = dev->dev.parent ? dev_to_node(dev->dev.parent) : -1;
struct sk_buff *skb;

skb = __alloc_skb(length + NET_SKB_PAD, gfp_mask, 0, node);
skb = __alloc_skb(length + NET_SKB_PAD, gfp_mask, 0, NUMA_NO_NODE);
if (likely(skb)) {
skb_reserve(skb, NET_SKB_PAD);
skb->dev = dev;
Expand All @@ -259,16 +258,6 @@ struct sk_buff *__netdev_alloc_skb(struct net_device *dev,
}
EXPORT_SYMBOL(__netdev_alloc_skb);

struct page *__netdev_alloc_page(struct net_device *dev, gfp_t gfp_mask)
{
int node = dev->dev.parent ? dev_to_node(dev->dev.parent) : -1;
struct page *page;

page = alloc_pages_node(node, gfp_mask, 0);
return page;
}
EXPORT_SYMBOL(__netdev_alloc_page);

void skb_add_rx_frag(struct sk_buff *skb, int i, struct page *page, int off,
int size)
{
Expand Down

0 comments on commit 0d8c891

Please sign in to comment.