
Issue 11
© Solarflare Communications 2014
88
Solarflare Server Adapter
User Guide
•
Global_flow_table:
Identifies the number of simultaneous flows that are managed by RFS.
•
Per_queue_table
: Identifies the number of flows that can be steered to a queue. This holds
state as to when a packet was last received.
The tables support the steering of incoming packets from the network adapter to a receive queue
affinitized to a CPU where the application is waiting to receive them. The Solarflare accelerated RFS
implementation requires configuration through the two tables and the ethtool -K command.
The following sub-sections identify the RFS configuration procedures:
Kernel Configuration
Before using RFS the kernel must be compiled with the kconfig symbol
CONFIG_RPS
enabled.
Global Flow Count
Configure the number of simultaneous flows that will be managed by RFS. The suggested flow count
will depend on the expected number of active connections at any given time and may be less than
the number of open connections. The value is rounded up to the nearest power of two.
Per Queue Flow Count
For each adapter interface there will exist a ’queue’ directory containing one ’rx’ or ’tx’ subdirectory
for each queue associated with the interface. For RFS only the receive queues are relevant.
Within each ’rx’ subdirectory, the
rps_flow_cnt
file holds the number of entries in the per- queue
flow table. If only a single queue is used then
rps_flow_cnt
will be the same as
rps_sock_flow_entries
. When multiple queues are configured the count will be equal to
rps_sock_flow_entries/N
where N is the number of queues, for example:
rps_sock_flow_entries
= 32768 and there are 16 queues then
rps_flow_cnt
for each queue
will be configured as 2048.
Disable RFS
To turn off RFS using the following command:
# echo 32768 > /proc/sys/net/core/rps_sock_flow_entries
# cd /sys/class/net/eth3/queue
# echo 2048 > /sys/class/net/eth3/queues/rx-0/rps_flow_cnt
# echo 2048 > /sys/class/net/eth3/queues/rx-1/rps_flow_cnt
# ethtool -K <devname> ntuple off