Explicit Congestion Notification (ECN)
ECN is an extension to the IP protocol. It allows reliable communication by notifying all ends of communication when congestion occurs. This is done without dropping packets.
Please note that this feature requires all nodes in the path (nodes, routers etc) between the communicating nodes to support ECN to ensure reliable communication. ECN is marked as 2 bits in the traffic control IP header. This ECN implementation refers to RoCE v2.
To enable ECN on the hosts:
Enable ECN in sysfs.
/sys/
class
/net/<interface
>/<protocol>/ecn_<protocol>_enable =1
Query the attribute.
cat /sys/
class
/net/<interface
>/ecn/<protocol>/params/<requested attribute>Modify the attribute.
echo <value> /sys/
class
/net/<interface
>/ecn/<protocol>/params/<requested attribute>
ECN supports the following algorithms:
r_roce_ecn_rp - Reaction point
r_roce_ecn_np - Notification point
Each algorithm has a set of relevant parameters and statistics, which are defined per device, per port, per priority.
cat /sys/class
/net/<interface
>/ecn/<protocol>/enable/X
cat /sys/class
/net/<interface
>/ecn/<protocol>/requested attributes
echo 1
> /sys/class
/net/<interface
>/ecn/<protocol>/enable/X
echo <value> > /sys/class
/net/<interface
>/ecn/<protocol>/requested attributes
where:
X: priority {0..7}
protocol: roce_rp / roce_np
requested attributes: Next Slide for each protocol.