Commit c35656db authored by Aaro Koskinen's avatar Aaro Koskinen Committed by Greg Kroah-Hartman

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: default avatarAaro Koskinen <aaro.koskinen@iki.fi>
Acked-by: default avatarDavid Daney <david.daney@cavium.com>
Acked-by: default avatarJason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ed12cd61
...@@ -48,13 +48,8 @@ static int cvm_oct_fill_hw_skbuff(int pool, int size, int elements) ...@@ -48,13 +48,8 @@ static int cvm_oct_fill_hw_skbuff(int pool, int size, int elements)
while (freed) { while (freed) {
struct sk_buff *skb = dev_alloc_skb(size + 256); struct sk_buff *skb = dev_alloc_skb(size + 256);
if (unlikely(skb == NULL)) { if (unlikely(skb == NULL))
pr_warning
("Failed to allocate skb for hardware pool %d\n",
pool);
break; break;
}
skb_reserve(skb, 256 - (((unsigned long)skb->data) & 0x7f)); skb_reserve(skb, 256 - (((unsigned long)skb->data) & 0x7f));
*(struct sk_buff **)(skb->data - sizeof(void *)) = skb; *(struct sk_buff **)(skb->data - sizeof(void *)) = skb;
cvmx_fpa_free(skb->data, pool, DONT_WRITEBACK(size / 128)); cvmx_fpa_free(skb->data, pool, DONT_WRITEBACK(size / 128));
......
...@@ -337,9 +337,6 @@ static int cvm_oct_napi_poll(struct napi_struct *napi, int budget) ...@@ -337,9 +337,6 @@ static int cvm_oct_napi_poll(struct napi_struct *napi, int budget)
*/ */
skb = dev_alloc_skb(work->len); skb = dev_alloc_skb(work->len);
if (!skb) { if (!skb) {
printk_ratelimited("Port %d failed to allocate "
"skbuff, packet dropped\n",
work->ipprt);
cvm_oct_free_work(work); cvm_oct_free_work(work);
continue; continue;
} }
......
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