DOCA Documentation v2.10.0

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:

  1. Enable ECN in sysfs.

    Copy
    Copied!
                

    /sys/class/net/<interface>/ecn/<protocol>/enable/<X>

  2. Query the attribute.

    Copy
    Copied!
                

    cat /sys/class/net/<interface>/ecn/<protocol>/params/<requested attribute>

  3. Modify the attribute.

    Copy
    Copied!
                

    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.

To query whether ECN is enabled per Priority X:

Copy
Copied!
            

cat /sys/class/net/<interface>/ecn/<protocol>/enable/X

To read ECN configurable parameters:

Copy
Copied!
            

cat /sys/class/net/<interface>/ecn/<protocol>/requested attributes

To enable ECN for each priority per protocol:

Copy
Copied!
            

echo 1 > /sys/class/net/<interface>/ecn/<protocol>/enable/X

To modify ECN configurable parameters:

Copy
Copied!
            

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.

© Copyright 2025, NVIDIA. Last updated on Feb 26, 2025.