[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <516FE36B.9050801@linutronix.de>
Date: Thu, 18 Apr 2013 14:13:31 +0200
From: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
To: Mugunthan V N <mugunthanvnm@...com>
CC: netdev@...r.kernel.org, tglx@...utronix.de,
"David S. Miller" <davem@...emloft.net>
Subject: Re: [PATCH 5/5] net/cpsw: redo rx skb allocation in rx path
On 04/18/2013 01:50 PM, Mugunthan V N wrote:
>> diff --git a/drivers/net/ethernet/ti/cpsw.c
>> b/drivers/net/ethernet/ti/cpsw.c
>> index 559b020..f684e9b 100644
>> --- a/drivers/net/ethernet/ti/cpsw.c
>> +++ b/drivers/net/ethernet/ti/cpsw.c
>> @@ -469,43 +469,36 @@ void cpsw_tx_handler(void *token, int len, int
<snip>
>> - if (unlikely(!netif_running(ndev))) {
>> - if (skb)
>> - dev_kfree_skb_any(skb);
>> - return;
>> + } else {
>> + priv->stats.rx_dropped++;
>> + new_skb = skb;
> Why you want to drop a successfully received packet as you memory alloc
> failed?
> Let the stack get it processed and there after you can continue with one
> less
> rx skb
Because, as I wrote, if this continues you end up without rx skbs.
However, if you if you are under memory pressure it is possible that
other callers in the stack have the same problem.
>
> Regards
> Mugunthan V N
Sebastian
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists