From: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
To: David Miller <davem@davemloft.net>
Cc: afleming@gmail.com, afleming@freescale.com, netdev@vger.kernel.org
Subject: [PATCH v2] net/gianfar: drop recycled skbs on MTU change
Date: Wed, 5 May 2010 10:30:47 +0200 [thread overview]
Message-ID: <20100505083047.GA4398@Chamillionaire.breakpoint.cc> (raw)
In-Reply-To: <20100505.005704.115933493.davem@davemloft.net>
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
The size for skbs 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 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.
This has the side effect of dropping them on reset which is not
required.
drivers/net/gianfar.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c
index 4e97ca1..5d3763f 100644
--- a/drivers/net/gianfar.c
+++ b/drivers/net/gianfar.c
@@ -1649,6 +1649,7 @@ static void free_skb_resources(struct gfar_private *priv)
sizeof(struct rxbd8) * priv->total_rx_ring_size,
priv->tx_queue[0]->tx_bd_base,
priv->tx_queue[0]->tx_bd_dma_base);
+ skb_queue_purge(&priv->rx_recycle);
}
void gfar_start(struct net_device *dev)
@@ -2088,7 +2089,6 @@ static int gfar_close(struct net_device *dev)
disable_napi(priv);
- skb_queue_purge(&priv->rx_recycle);
cancel_work_sync(&priv->reset_task);
stop_gfar(dev);
--
1.6.6.1
next prev parent reply other threads:[~2010-05-05 8:30 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
2010-05-05 8:30 ` Sebastian Andrzej Siewior [this message]
2010-05-05 15:18 ` [PATCH v2] " 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=20100505083047.GA4398@Chamillionaire.breakpoint.cc \
--to=sebastian@breakpoint.cc \
--cc=afleming@freescale.com \
--cc=afleming@gmail.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
/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).