[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 05 May 2010 00:57:04 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: afleming@...il.com
Cc: sebastian@...akpoint.cc, afleming@...escale.com,
netdev@...r.kernel.org
Subject: Re: [PATCH] net/gianfar: drop recycled skbs on MTU change
From: Andy Fleming <afleming@...il.com>
Date: Tue, 4 May 2010 08:29:06 -0700
> On Mon, May 3, 2010 at 8:17 AM, Sebastian Andrzej Siewior
> <sebastian@...akpoint.cc> wrote:
>> From: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
>>
>> The size for skb which is added to the recycled list is using the
>> current descriptor size which is current MTU. gfar_new_skb() is also
>> using this size. So after changing or alteast increasing the MTU all
>> recycled skbs should be dropped.
>>
>> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
>> ---
>> I'm not 100% sure but it looks like it is wrong.
>>
>> drivers/net/gianfar.c | 4 +++-
>> 1 files changed, 3 insertions(+), 1 deletions(-)
>>
>> diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c
>> index 5267c27..9093106 100644
>> --- a/drivers/net/gianfar.c
>> +++ b/drivers/net/gianfar.c
>> @@ -2287,8 +2287,10 @@ static int gfar_change_mtu(struct net_device *dev, int new_mtu)
>>
>> /* Only stop and start the controller if it isn't already
>> * stopped, and we changed something */
>> - if ((oldsize != tempsize) && (dev->flags & IFF_UP))
>> + if ((oldsize != tempsize) && (dev->flags & IFF_UP)) {
>> stop_gfar(dev);
>> + skb_queue_purge(&priv->rx_recycle);
>> + }
>
>
> I think we should probably do this in free_skb_resources. And remove
> the call from gfar_close().
Ok, Sebastian please rework your patch as requested by Andy.
Thanks.
--
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