Explicit Congestion Notification
Explicit congestion notification (ECN), an extension to the IP protocol, enables reliable communication by signaling congestion without dropping packets. To ensure reliable operation, all nodes along the communication path (including routers) must support ECN.
ECN is represented by two bits in the traffic control IP header and is implemented in this context for RoCE v2.
To enable ECN on the hosts:
Enable ECN in sysfs.
/sys/
class
/net/<interface
>/ecn/<protocol>/enable/<X>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 pointr_roce_ecn_np
- Notification point
Each algorithm has a set of relevant parameters and statistics, which are defined per device, per port, per priority.
To query whether ECN is enabled per Priority X:
cat /sys/class
/net/<interface
>/ecn/<protocol>/enable/X
To read ECN configurable parameters:
cat /sys/class
/net/<interface
>/ecn/<protocol>/requested attributes
To enable ECN for each priority per protocol:
echo 1
> /sys/class
/net/<interface
>/ecn/<protocol>/enable/X
To modify ECN configurable parameters:
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.