netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: afleming@gmail.com
Cc: sebastian@breakpoint.cc, afleming@freescale.com, netdev@vger.kernel.org
Subject: Re: [PATCH] net/gianfar: drop recycled skbs on MTU change
Date: Wed, 05 May 2010 00:57:04 -0700 (PDT)	[thread overview]
Message-ID: <20100505.005704.115933493.davem@davemloft.net> (raw)
In-Reply-To: <o2g2acbd3e41005040829rc5bf7e0dwee8419b2b65e5468@mail.gmail.com>

From: Andy Fleming <afleming@gmail.com>
Date: Tue, 4 May 2010 08:29:06 -0700

> On Mon, May 3, 2010 at 8:17 AM, Sebastian Andrzej Siewior
> <sebastian@breakpoint.cc> wrote:
>> From: Sebastian Andrzej Siewior <bigeasy@linutronix.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@linutronix.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.

  reply	other threads:[~2010-05-05  7:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-03 15:17 [PATCH] net/gianfar: drop recycled skbs on MTU change Sebastian Andrzej Siewior
2010-05-03 22:29 ` David Miller
2010-05-04 15:29 ` Andy Fleming
2010-05-05  7:57   ` David Miller [this message]
2010-05-05  8:30     ` [PATCH v2] " Sebastian Andrzej Siewior
2010-05-05 15:18       ` Andy Fleming
2010-05-06  7:26         ` David Miller

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=20100505.005704.115933493.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=afleming@freescale.com \
    --cc=afleming@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=sebastian@breakpoint.cc \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).