diff options
author | Stephen Hemminger <shemminger@osdl.org> | 2006-03-23 14:07:24 -0500 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-03-23 17:13:54 -0500 |
commit | b5d56ddc3f839e94e97a3eb8afb4d0d64a9f2ef8 (patch) | |
tree | 0b3f2130c6c1afbfc71ed55c19f12d31fb7ac22a /drivers | |
parent | 901ccefb2dd7fe6a9e750a68f990f2a7d76b78d2 (diff) |
[PATCH] skge: dont use dev_alloc_skb for rx buffs
The skge driver was using dev_alloc_skb which reserves space for the
Ethernet header. This unnecessary and it should just use alloc_skb,
also by using GFP_KERNEL during startup it won't run into problems when
a user asks for a huge ring size or mtu and potentially drains the
reserved atomic pool.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/skge.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/skge.c b/drivers/net/skge.c index 89a6252ac7cc..b0aa150bbd8a 100644 --- a/drivers/net/skge.c +++ b/drivers/net/skge.c | |||
@@ -829,7 +829,7 @@ static int skge_rx_fill(struct skge_port *skge) | |||
829 | do { | 829 | do { |
830 | struct sk_buff *skb; | 830 | struct sk_buff *skb; |
831 | 831 | ||
832 | skb = dev_alloc_skb(skge->rx_buf_size + NET_IP_ALIGN); | 832 | skb = alloc_skb(skge->rx_buf_size + NET_IP_ALIGN, GFP_KERNEL); |
833 | if (!skb) | 833 | if (!skb) |
834 | return -ENOMEM; | 834 | return -ENOMEM; |
835 | 835 | ||
@@ -2592,7 +2592,7 @@ static inline struct sk_buff *skge_rx_get(struct skge_port *skge, | |||
2592 | goto error; | 2592 | goto error; |
2593 | 2593 | ||
2594 | if (len < RX_COPY_THRESHOLD) { | 2594 | if (len < RX_COPY_THRESHOLD) { |
2595 | skb = dev_alloc_skb(len + 2); | 2595 | skb = alloc_skb(len + 2, GFP_ATOMIC); |
2596 | if (!skb) | 2596 | if (!skb) |
2597 | goto resubmit; | 2597 | goto resubmit; |
2598 | 2598 | ||
@@ -2607,7 +2607,7 @@ static inline struct sk_buff *skge_rx_get(struct skge_port *skge, | |||
2607 | skge_rx_reuse(e, skge->rx_buf_size); | 2607 | skge_rx_reuse(e, skge->rx_buf_size); |
2608 | } else { | 2608 | } else { |
2609 | struct sk_buff *nskb; | 2609 | struct sk_buff *nskb; |
2610 | nskb = dev_alloc_skb(skge->rx_buf_size + NET_IP_ALIGN); | 2610 | nskb = alloc_skb(skge->rx_buf_size + NET_IP_ALIGN, GFP_ATOMIC); |
2611 | if (!nskb) | 2611 | if (!nskb) |
2612 | goto resubmit; | 2612 | goto resubmit; |
2613 | 2613 | ||