Re: Ethernet driver link state propagation to ip stack
From: Peter Buckingham
Date: Fri Jan 14 2005 - 13:56:48 EST
Hi Juri,
Jüri Põldre wrote:
I am experiencing issues with connecting two network adapters to the same
subnet, eg.
I recently had similar problems (specifically with the e1000 driver).
When one hang goes down a send to the other interface will hang. This
was when we were using the same socket to send on both interfaces, what
resulted is that the socket buffer would fill up and cause the send to
block. If you aren't using the same socket to send out on both
interfaces you should be fine. the rather large hack that i used to get
this to work on my system is below. basically it will not enqueue a
packet when the interface is down. this may well do nasty things to tcp...
peter
---
--- linux-2.6.8-24.3/net/core/dev.c
+++ linux-2.6.8-24.3/net/core/dev.c
@@ -1379,6 +1379,11 @@
#ifdef CONFIG_NET_CLS_ACT
skb->tc_verd = SET_TC_AT(skb->tc_verd,AT_EGRESS);
#endif
+ if (!netif_carrier_ok(dev)) {
+ rc = NET_XMIT_DROP;
+ goto out_kfree_skb;
+ }
+
if (q->enqueue) {
/* Grab device queue */
spin_lock(&dev->queue_lock);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/