| To: | hadi@xxxxxxxxxx |
|---|---|
| Subject: | Re: [patch 4/10] s390: network driver. |
| From: | Tommy Christensen <tommy.christensen@xxxxxxxxx> |
| Date: | Wed, 05 Jan 2005 16:35:13 +0100 |
| Cc: | Jeff Garzik <jgarzik@xxxxxxxxx>, Thomas Spatzier <thomas.spatzier@xxxxxxxxxx>, "David S. Miller" <davem@xxxxxxxxxxxxx>, Hasso Tepper <hasso@xxxxxxxxx>, Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>, netdev@xxxxxxxxxxx, Paul Jakma <paul@xxxxxxxx> |
| In-reply-to: | <1104895169.1117.63.camel@xxxxxxxxxxxxxxxx> |
| References: | <OFB7F7E23F.EFB88418-ONC1256F7E.0031769E-C1256F7E.003270AD@xxxxxxxxxx> <1104764710.1048.580.camel@xxxxxxxxxxxxxxxx> <41DB26A6.2070008@xxxxxxxxx> <1104895169.1117.63.camel@xxxxxxxxxxxxxxxx> |
| Sender: | netdev-bounce@xxxxxxxxxxx |
| User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2) Gecko/20040803 |
jamal wrote: On Tue, 2005-01-04 at 18:28, Jeff Garzik wrote:jamal wrote:The change is simple if theres consensus to go this path.Can you resend your patch?I didnt send any patch - but heres one that looks right - havent tried compiling it. Thank you for diving into this, Jamal. For the patch to have much effect, we need to check the carrier before calling hard_start_xmit(). Like in the modified patch below. My main objection was that any change should be made in the core, not in individual net drivers.Attached patch resolves that concern Except for the drivers that call netif_stop_queue() on link-down. These calls (and the corresponding netif_wake_queue) would have to be removed. -Tommy --- linux-2.6.10-bk7/net/sched/sch_generic.c Wed Jan 5 16:27:13 2005
+++ linux-2.6.10-work/net/sched/sch_generic.c Wed Jan 5 16:28:53 2005
@@ -134,7 +134,7 @@
/* And release queue */
spin_unlock(&dev->queue_lock);
- if (!netif_queue_stopped(dev)) {
+ if (!netif_queue_stopped(dev) && netif_carrier_ok(dev))
{
int ret;
if (netdev_nit)
dev_queue_xmit_nit(skb, dev);
@@ -162,6 +162,11 @@
}
spin_lock(&dev->queue_lock);
q = dev->qdisc;
+ if (!netif_carrier_ok(dev)) {
+ kfree_skb(skb);
+ q->qstats.drops++;
+ return -1;
+ }
}
/* Device kicked us out :(
|
| Previous by Date: | Re: V2.4 policy router operates faster/better than V2.6, Jeremy M. Guthrie |
|---|---|
| Next by Date: | Re: V2.4 policy router operates faster/better than V2.6, Robert Olsson |
| Previous by Thread: | Re: [patch 4/10] s390: network driver., jamal |
| Next by Thread: | Re: [patch 4/10] s390: network driver., jamal |
| Indexes: | [Date] [Thread] [Top] [All Lists] |