According to the 3th page of the reference material, the following elements need to be taken into consideration
- Maximum transmission unit (MTU) on the transimitting end of receiver R
- Speed of Wire W
- Transceiver latency (negligible) < 1280bytes
- Response time of sender S
- MTU on the transmitting end of sender S
The headroom should be the possible total length of bits transmitted in these five stages above.
For 100GbE, 100 meter twin-ax copper cable, QSFP+
MTU[R] + 100Gb/s * 476ns * 2 + 512 * 60bits + MTU[S]
which in bytes
MTU[S] + MTU[R] + 3840bytes + 130bytes per 100 meters per GbE
Speed of wire W is the only variable element in the definition of the receiver thresholds.
Priority Flow Control: Build Reliable Layer 2 Infrastructure
https://community.mellanox.com/s/article/howto-tune-receive-buffers-on-mellanox-adapter-cards