diff options
author | Aaro Koskinen <aaro.koskinen@iki.fi> | 2013-09-05 14:44:00 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-09-17 10:39:27 -0400 |
commit | c35656db4dfdbcc98782bfac6bf17868f9cb8ce3 (patch) | |
tree | 86f3c2da702df535e7b4e5cfd930341b9470c961 | |
parent | ed12cd612a0ca95162c0505a3fcd94fd047a8928 (diff) |
staging: octeon-ethernet: remove skb alloc failure warnings
Remove skb allocation failure warnings. They will trigger a page
allocation warning already. Also, one of the warnings was not ratelimited,
causing the box to lock up under heavy traffic & low memory.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Acked-by: David Daney <david.daney@cavium.com>
Acked-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/octeon/ethernet-mem.c | 7 | ||||
-rw-r--r-- | drivers/staging/octeon/ethernet-rx.c | 3 |
2 files changed, 1 insertions, 9 deletions
diff --git a/drivers/staging/octeon/ethernet-mem.c b/drivers/staging/octeon/ethernet-mem.c index 78b6cb743769..199059d64c9b 100644 --- a/drivers/staging/octeon/ethernet-mem.c +++ b/drivers/staging/octeon/ethernet-mem.c | |||
@@ -48,13 +48,8 @@ static int cvm_oct_fill_hw_skbuff(int pool, int size, int elements) | |||
48 | while (freed) { | 48 | while (freed) { |
49 | 49 | ||
50 | struct sk_buff *skb = dev_alloc_skb(size + 256); | 50 | struct sk_buff *skb = dev_alloc_skb(size + 256); |
51 | if (unlikely(skb == NULL)) { | 51 | if (unlikely(skb == NULL)) |
52 | pr_warning | ||
53 | ("Failed to allocate skb for hardware pool %d\n", | ||
54 | pool); | ||
55 | break; | 52 | break; |
56 | } | ||
57 | |||
58 | skb_reserve(skb, 256 - (((unsigned long)skb->data) & 0x7f)); | 53 | skb_reserve(skb, 256 - (((unsigned long)skb->data) & 0x7f)); |
59 | *(struct sk_buff **)(skb->data - sizeof(void *)) = skb; | 54 | *(struct sk_buff **)(skb->data - sizeof(void *)) = skb; |
60 | cvmx_fpa_free(skb->data, pool, DONT_WRITEBACK(size / 128)); | 55 | cvmx_fpa_free(skb->data, pool, DONT_WRITEBACK(size / 128)); |
diff --git a/drivers/staging/octeon/ethernet-rx.c b/drivers/staging/octeon/ethernet-rx.c index 10e54165d89c..e14a1bb04361 100644 --- a/drivers/staging/octeon/ethernet-rx.c +++ b/drivers/staging/octeon/ethernet-rx.c | |||
@@ -337,9 +337,6 @@ static int cvm_oct_napi_poll(struct napi_struct *napi, int budget) | |||
337 | */ | 337 | */ |
338 | skb = dev_alloc_skb(work->len); | 338 | skb = dev_alloc_skb(work->len); |
339 | if (!skb) { | 339 | if (!skb) { |
340 | printk_ratelimited("Port %d failed to allocate " | ||
341 | "skbuff, packet dropped\n", | ||
342 | work->ipprt); | ||
343 | cvm_oct_free_work(work); | 340 | cvm_oct_free_work(work); |
344 | continue; | 341 | continue; |
345 | } | 342 | } |