Hi! I'm researching the topic of PAUSE counters (receiving side) for FreeBSD systems. That's a sort of flow control with ethernet, see e.g.: http://www.techfest.com/networking/lan/ethernet3.htm#3.2.1 Cisco switches seem to receive and count them, which helps to find short-term (seconds) overloaded links. Can FreeBSD 6.x or 7.x handle PAUSE frames, at least receiving them ? Thanks for any pointer! -- pi@opsec.eu +49 171 3101372 12 years to go !
On Fri, Feb 29, 2008 at 11:41:07AM +0100, Kurt Jaeger wrote: > Hi! > > I'm researching the topic of PAUSE counters (receiving side) for > FreeBSD systems. > > That's a sort of flow control with ethernet, see e.g.: > > http://www.techfest.com/networking/lan/ethernet3.htm#3.2.1 > > Cisco switches seem to receive and count them, which helps > to find short-term (seconds) overloaded links. FreeBSD has no such framework in mii layer yet so it's completely up to driver. em(4) handles flow-control in driver so it can handle flow-control. > Can FreeBSD 6.x or 7.x handle PAUSE frames, at least receiving them ? > Receiving pause frames have no problem on any driver but most drivers does not respond with the pause frames. AFAIK marius@ has a flow-control patch so I guess FreeBSD will have generic flow-control capability which will make it available on all ethernet drivers with minor modification. > Thanks for any pointer! > -- Regards, Pyun YongHyeon
----- "Kurt Jaeger" <lists@c0mplx.org> wrote:> Hi! > > I'm researching the topic of PAUSE counters (receiving side) for > FreeBSD systems. > > That's a sort of flow control with ethernet, see e.g.: > > http://www.techfest.com/networking/lan/ethernet3.htm#3.2.1 > > Cisco switches seem to receive and count them, which helps > to find short-term (seconds) overloaded links. > Can FreeBSD 6.x or 7.x handle PAUSE frames, at least receiving them ?FreeBSD does not send PAUSE frames, but most of the NICs out there will process received PAUSE frames. However ethernet flow control is mainly useful on the switches anyways. Switches these day (*) have small buffers (sometimes just a shared 3MB buffer for 24 ports). If several ports send too much to a single port at the same time, the switch could run out of buffer space in milliseconds and start dropping frames, so the switch will use flow control to get the transmitting ports to slow down, and let the buffer drain. Slowing down the senders with ethernet flow control results in better performance than letting some frames drop, and force a timeout and retransmit. Of course, deeper buffers would be even better. Servers have large buffers, and mostly use TCP, which also implements flow control. So not much of a problem usually. I don't know if you could tell much by counting PAUSE frames though. You won't know the destination port that was congested, just the port(s) that were generating the traffic, that the switch told to slow down. Tom (*) I remember when some 10/100 switches had 1MB of buffer space per port. They don't make them anymore.
Tom Samplonius wrote:> FreeBSD does not send PAUSE frames, but most of the NICs out there will process received PAUSE frames. > > However ethernet flow control is mainly useful on the switches anyways. Switches these day (*) have small buffers (sometimes just a shared 3MB buffer for 24 ports). If several ports send too much to a single port at the same time, the switch could run out of buffer space in milliseconds and start dropping frames, so the switch will use flow control to get the transmitting ports to slow down, and let the buffer drain. Slowing down the senders with ethernet flow control results in better performance than letting some frames drop, and force a timeout and retransmit. Of course, deeper buffers would be even better. > >There are switch ASICs out there which implement upstream bandwidth limiting on ports by sending the PAUSE frame. I believe thompsa@ recently committed a fix to if_bridge to allow it to ignore PAUSE frames for the purposes of forwarding (they should never be forwarded, they are link scope only). It would be interesting to see a patch which implemented rate limiting in the same way as these ASICs do, but in if_bridge. cheers BMS