[Top] [All Lists]

Re: [patch 4/10] s390: network driver.

To: hadi@xxxxxxxxxx
Subject: Re: [patch 4/10] s390: network driver.
From: Tommy Christensen <tommy.christensen@xxxxxxxxx>
Date: Mon, 20 Dec 2004 00:46:04 +0100
Cc: Thomas Spatzier <thomas.spatzier@xxxxxxxxxx>, "David S. Miller" <davem@xxxxxxxxxxxxx>, Hasso Tepper <hasso@xxxxxxxxx>, Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>, jgarzik@xxxxxxxxx, netdev@xxxxxxxxxxx, Paul Jakma <paul@xxxxxxxx>
In-reply-to: <1103497516.1046.231.camel@xxxxxxxxxxxxxxxx>
References: <OF28701C56.81E1D26E-ONC1256F6B.00513EDD-C1256F6B.0052AF84@xxxxxxxxxx> <1103484552.1046.155.camel@xxxxxxxxxxxxxxxx> <41C600D7.70005@xxxxxxxxx> <1103497516.1046.231.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 Sun, 2004-12-19 at 17:29, Tommy Christensen wrote:

I haven't tried this myself, but surely it can happen when the
socket send-buffer is smaller than what can be queued up for
transmission: i.e. in the qdisc queue and device DMA ring.

Shouldnt this have to do with socket options? If you wish to block while
waiting for send, then you should be allowed.
For a routing protocol that actually is notified that the link went
down, it should probably flush those socket buffer at that point.

OK. So is this the recommendation for these pour souls?

 - Use a socket for each device.
 - Set the socket buffer (SO_SNDBUF) large enough. E.g. 1 MB ?
   Or use non-blocking sockets - just in case.
 - If you care about not sending stale packets, it is the
   responsibility of the application to flush the socket on
   link-down events (by down'ing the interface?).

Well, this is the same as what started this whole thread.
I believe that stopping the queue on link-down events is simply
bad behavior of the driver.

From what Thomas was saying, this is not what he was doing. Read his

It was at least to the same effect. The key issue is whether the
packets are kept in the queue (qdisc) until the link is back up,
or they are drained (and dropped) by the driver.


<Prev in Thread] Current Thread [Next in Thread>