HowTo Steer PTP traffic to single RX ring (via ethtool)

Version 2

    This post shows how to steer PTP traffic to single RX ring via ethtool commands. PTP traffic uses UDP ports 320 and 319, As a result of RSS (Receive Side Steering) PTP traffic coming to UDP ports 319 and 320, it may arrive to the user space application out of order. In order to prevent this you need to steer the PTP traffic to single RX ring using ethtool.

    This feature is supported in ConnectX-4 using MLNX_OFED 4.0.

     

    References

     

    Configuration

    1. Get the ring configuration

    # ethtool -u eth1

    56 RX rings available

    Total 0 rules

     

    2. Create two rules one for each of the UDP ports with the same action number (0)

    # ethtool -U eth1 flow-type udp4 dst-port 319 action 0 loc 1

    # ethtool -U eth1 flow-type udp4 dst-port 320 action 0 loc 2

     

    3. Check the configuration:

    # ethtool -u eth1

    56 RX rings available

    Total 2 rules

     

    Filter: 1

      Rule Type: UDP over IPv4

      Src IP addr: 0.0.0.0 mask: 255.255.255.255

      Dest IP addr: 0.0.0.0 mask: 255.255.255.255

      TOS: 0x0 mask: 0xff

      Src port: 0 mask: 0xffff

      Dest port: 319 mask: 0x0

      Action: Direct to queue 0

     

    Filter: 2

      Rule Type: UDP over IPv4

      Src IP addr: 0.0.0.0 mask: 255.255.255.255

      Dest IP addr: 0.0.0.0 mask: 255.255.255.255

      TOS: 0x0 mask: 0xff

      Src port: 0 mask: 0xffff

      Dest port: 320 mask: 0x0

      Action: Direct to queue 0