
Solarflare
Server
Adapter
User
Guide
Solarflare
Adapters
on
Linux
Issue
20
©
Solarflare
Communications
2017
83
3.17
Receive
Flow
Steering
(RFS)
RFS
will
attempt
to
steer
packets
to
the
core
where
a
receiving
application
is
running.
This
reduces
the
need
to
move
data
between
processor
caches
and
can
significantly
reduce
latency
and
jitter.
Modern
NUMA
systems,
in
particular,
can
benefit
substantially
from
RFS
where
packets
are
delivered
into
memory
local
to
the
receiving
thread.
Unlike
RSS
which
selects
a
CPU
from
a
CPU
affinity
mask
set
by
an
administrator
or
user,
RFS
will
store
the
application's
CPU
core
identifier
when
the
application
process
calls
recvmsg()
or
sendmsg()
.
•
A
hash
is
calculated
from
a
packet’s
addresses
or
ports
(2
‐
tuple
or
4
‐
tuple)
and
serves
as
the
consistent
hash
for
the
flow
associated
with
the
packet.
•
Each
receive
queue
has
an
associated
list
of
CPUs
to
which
RFS
may
enqueue
the
received
packets
for
processing.
•
For
each
received
packet,
an
index
into
the
CPU
list
is
computed
from
the
flow
hash
modulo
the
size
of
the
CPU
list.
There
are
two
types
of
RFS
implementation;
Soft
RFS
and
Hardware
(or
Accelerated)
RFS.
Soft
RFS
is
a
software
feature
supported
since
Linux
2.6.35
that
attempts
to
schedule
protocol
processing
of
incoming
packets
on
the
same
processor
as
the
user
thread
that
will
consume
the
packets.
Accelerated
RFS
requires
Linux
kernel
version
2.6.39
or
later,
with
the
Linux
sfc
driver
or
Solarflare
v3.2
network
adapter
driver.
RFS
can
dynamically
change
the
allowed
CPUs
that
can
be
assigned
to
a
packet
or
packet
stream
and
this
introduces
the
possibility
of
out
of
order
packets.
To
prevent
out
of
order
data,
two
tables
are
created
that
hold
state
information
used
in
the
CPU
selection.
•
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.
Accelerated
RFS
is
only
available
if
the
kernel
is
complied
with
the
kconfig
symbol
CONFIG_RFS_ACCEL
enabled.