3

I have recently seen a Debian forum that mentioned pause frames should be discarded by the MAC layer and if not the driver should discard them. Is this true? How does a host actually throttle back traffic if it received a pause frame from a switch?

I am trying to get a better understanding of Ethernet flow control. If the above statement is true, what does passed to the host really mean?

user_ABCD
  • 229

2 Answers2

3

There are three ways you can handle flow control:

  1. If you're overloaded, you drop data on the floor.
  2. If you can't provide service for a request from a higher layer, typically because your local queue is full, you return an error to that higher layer.
  3. You proactively notify higher layers that they need to slow down.

At the Ethernet layer, method 3 is supported through pause frames. Often higher layers don't support method 3, but instead support method 2. When a layer has a layer below it that supports method 3 but the layer above it only supports method 2, it can stop passing data to lower layers temporarily, causing method 2 to apply to higher layers.

Or, to put it more concretely, when you receive a pause frame you stop your sending engine and set a timer to restart the sending engine in the appropriate time. While the sending engine is stopped, your local queues will fill up with data from higher layers. If they get full, you return "busy" errors to the higher layers and they handle that however is appropriate.

3

Ethernet flow control, so far, has been a failed experiment, because it often causes head-of-line blocking problems. Switches should not send pause frames to hosts. I believe Cisco switches cannot be configured to send pause frames; enabling Ethernet flow control on a Cisco switch just causes it to honor pause frames it receives. Hosts are wise to ignore received pause frames.

If the switch can't handle the transmission, it should drop the frame. Higher layers, most notably TCP, use dropped frames to know when congestion has occurred and when to back off. Failing to drop frames causes TCP Congestion Control to fail, typically resulting in bufferbloat.

Spiff
  • 110,156