Congestion control is handled by both the sender and the receiver. If the receiver figures out that there is congestion that i can indicate the same to the sender by sending a packet back (probably thru another route). The sender then can take the appropriate action. Also congestion can be in any of the intermediate routes and the receiver may be totally unaware of it. In the end its the senders responsibility to make sure that the packets are delivered (and in order if necessary) and the its the receivers responsibility to make sure that i receives all the packets. Remember that some packets may get dropped by the intermediate routers and mechanism to handle this should also be implemented. -----Original Message----- From: kernelnewbies-bounce@xxxxxxxxxxxx [mailto:kernelnewbies-bounce@xxxxxxxxxxxx] On Behalf Of Michael Blizek Sent: 27 July 2009 20:15 To: ?ukasz Jachymczyk Cc: kernelnewbies@xxxxxxxxxxxx Subject: Re: Ethernet congestion management Hi! On 11:11 Mon 27 Jul , ?ukasz Jachymczyk wrote: > Michael Blizek wrote: > > >>>1) Congestion handling is usually done by the sender and not the receiver. > >>I'm not sure about this. After all I can send as much data over > >>network as I can and the receiver might have not enough resources to > >>handle it. Isn't receiver the one that should worry about > >>congestion? > > I might not say it clearly, but my driver is sending only raw > Ethernet frames. No TCP/IP. As you can see, it's very basic > communication. Yet I would be happy to know when device driver is > dropping packets. You have said earlier that you are programming a virtual ethernet driver. I do not completely understand what you want to do: some_stack - your virtual ethernet driver - some physical interface Do you do something which recovers lost packets? If you do, doing windowing as I have described at the layer which does the retransmissions is probably a good thing to do. If you have something above you which does this, you will not need to bother in many cases. > As I said, there used to be queue's cng_level struct member in > netif_rx. It contained information about ingress traffic queue > congestion level. But now it's gone and I can't figure out what else > to use. If you worry about receiver overload, doing windowing is probably the safest choice. -Michi -- programing a layer 3+4 network protocol for mesh networks see http://michaelblizek.twilightparadox.com -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ