All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Daney <ddaney.cavm@gmail.com>
To: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	devel@driverdev.osuosl.org, linux-mips@linux-mips.org,
	David Daney <david.daney@cavium.com>,
	"Jason A. Donenfeld" <Jason@zx2c4.com>,
	richard@nod.at
Subject: Re: [PATCH 2/3] staging: octeon-ethernet: remove skb alloc failure warnings
Date: Thu, 05 Sep 2013 11:57:18 -0700	[thread overview]
Message-ID: <5228D40E.3010208@gmail.com> (raw)
In-Reply-To: <1378406641-16530-3-git-send-email-aaro.koskinen@iki.fi>

On 09/05/2013 11:44 AM, Aaro Koskinen wrote:
> 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>

This seems fine.

Acked-by: David Daney <david.daney@cavium.com>

> ---
>   drivers/staging/octeon/ethernet-mem.c | 7 +------
>   drivers/staging/octeon/ethernet-rx.c  | 3 ---
>   2 files changed, 1 insertion(+), 9 deletions(-)
>
> diff --git a/drivers/staging/octeon/ethernet-mem.c b/drivers/staging/octeon/ethernet-mem.c
> index 78b6cb7..199059d 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)
>   	while (freed) {
>
>   		struct sk_buff *skb = dev_alloc_skb(size + 256);
> -		if (unlikely(skb == NULL)) {
> -			pr_warning
> -			    ("Failed to allocate skb for hardware pool %d\n",
> -			     pool);
> +		if (unlikely(skb == NULL))
>   			break;
> -		}
> -
>   		skb_reserve(skb, 256 - (((unsigned long)skb->data) & 0x7f));
>   		*(struct sk_buff **)(skb->data - sizeof(void *)) = skb;
>   		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 10e5416..e14a1bb 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)
>   			 */
>   			skb = dev_alloc_skb(work->len);
>   			if (!skb) {
> -				printk_ratelimited("Port %d failed to allocate "
> -						   "skbuff, packet dropped\n",
> -						   work->ipprt);
>   				cvm_oct_free_work(work);
>   				continue;
>   			}
>

  reply	other threads:[~2013-09-05 18:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-05 18:43 octeon-ethernet: bug fixes Aaro Koskinen
2013-09-05 18:43 ` [PATCH 1/3] staging: octeon-ethernet: make dropped packets to consume NAPI budget Aaro Koskinen
2013-09-05 18:55   ` David Daney
2013-09-05 18:55     ` David Daney
2013-09-05 18:44 ` [PATCH 2/3] staging: octeon-ethernet: remove skb alloc failure warnings Aaro Koskinen
2013-09-05 18:57   ` David Daney [this message]
2013-09-05 18:44 ` [PATCH 3/3] staging: octeon-ethernet: rgmii: enable interrupts that we can handle Aaro Koskinen
2013-09-05 19:00   ` David Daney
2013-09-05 19:00     ` David Daney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5228D40E.3010208@gmail.com \
    --to=ddaney.cavm@gmail.com \
    --cc=Jason@zx2c4.com \
    --cc=aaro.koskinen@iki.fi \
    --cc=david.daney@cavium.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-mips@linux-mips.org \
    --cc=richard@nod.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.