Receive Packet Steering

Version 1

    Receive Packet Steering (RPS) is a software implementation of RSS called later in the datapath.

     

    References

    Performance Tuning for Mellanox Adapters

    Overview

    Contrary to RSS which selects the queue and consequently the CPU that runs the hardware interrupt handler, RPS selects the CPU to perform protocol processing on top of the interrupt handler. RPS requires a kernel compiled with the CONFIG_RPS kconfig symbol (ON by default for SMP). Even when compiled in, RPS remains disabled until explicitly configured. The list of CPUs to which RPS may forward traffic can be configured for each receive queue using a sysfs file entry:

    /sys/class/net/<dev>/queues/rx-<n>/rps_cpus

    For interfaces that have a single queue or its number of queues is less than the number of NUMA node cores, it is recommended to configure the rps_cpus mask to the device NUMA node core list to gain the better parallelism of multi queue interfaces.

     

    Example:

    When IPoIB is used in “connected” mode, it has only a single rx queue.

     

    To enable RPS:

    # cat /sys/class/net/ib0/device/local_cpus

    0000,00000000,00000000,00fffc00,0fffc000

     

    # cat /sys/class/net/ib0/queues/rx-0/rps_cpus

    0000,00000000,00000000,00000000,00000000

     

    # LOCAL_CPUS=`cat /sys/class/net/ib0/device/local_cpus`

     

    # echo $LOCAL_CPUS > /sys/class/net/ib0/queues/rx-0/rps_cpus

     

    For further information, please refer to https://www.kernel.org/doc/Documentation/networking/scaling.txt