
Solarflare
Server
Adapter
User
Guide
Solarflare
Adapters
on
FreeBSD
Issue
20
©
Solarflare
Communications
2017
310
ifconfig_sfxge<n>="inet
<IPv4
address>
netmask
<netmask>
lro"
NOTE:
LRO
should
NOT
be
enabled
when
using
the
host
to
forward
packets
from
one
interface
to
another.
For
example,
if
the
host
is
performing
IP
routing.
TCP
Protocol
Tuning
TCP
Performance
can
also
be
improved
by
tuning
kernel
TCP
settings.
Settings
include
adjusting
send
and
receive
buffer
sizes,
connection
backlog,
congestion
control,
etc.
Initial
buffering
settings
should
provide
good
performance.
However
for
certain
applications,
tuning
buffer
settings
can
significantly
benefit
throughput.
To
change
buffer
settings,
adjust
the
tcp_rmem
and
tcp_wmem
using
the
sysctl
command:
•
Receive
buffering:
sysctl
net.ipv4.tcp_rmem="<min>
<default>
<max>"
•
Transmit
buffering:
sysctl
net.ipv4.tcp_wmem="<min>
<default>
<max>"
(
tcp_rmem
and
tcp_wmem
can
also
be
adjusted
for
IPV6
and
globally
with
the
net.ipv6
and
net.core
variable
prefixes
respectively).
Typically
it
is
sufficient
to
tune
just
the
max
buffer
value.
It
defines
the
largest
size
the
buffer
can
grow
to.
Suggested
alternate
values
are
max=500000
(1/2
Mbyte).
Factors
such
as
link
latency,
packet
loss
and
CPU
cache
size
all
influence
the
affect
of
the
max
buffer
size
values.
The
minimum
and
default
values
can
be
left
at
their
defaults
minimum=4096
and
default=87380.
See
https://wiki.freebsd.org/NetworkPerformanceTuning
for
more
details.
Receive
Side
Scaling
(RSS)
Solarflare
adapters
support
Receive
Side
Scaling
(RSS).
RSS
enables
packet
receive
‐
processing
to
scale
with
the
number
of
available
CPU
cores.
RSS
requires
a
platform
that
supports
MSI
‐
X
interrupts.
When
RSS
is
enabled
the
controller
uses
multiple
receive
queues
to
deliver
incoming
packets.
The
receive
queue
selected
for
an
incoming
packet
is
chosen
to
ensure
that
packets
within
a
TCP
stream
are
all
sent
to
the
same
receive
queue
–
this
ensures
that
packet
‐
ordering
within
each
stream
is
maintained.
Each
receive
queue
has
its
own
dedicated
MSI
‐
X
interrupt
which
ideally
should
be
tied
to
a
dedicated
CPU
core.
This
allows
the
receive
side
TCP
processing
to
be
distributed
amongst
the
available
CPU
cores,
providing
a
considerable
performance
advantage
over
a
conventional
adapter
architecture
in
which
all
received
packets
for
a
given
interface
are
processed
by
just
one
CPU
core.
By
default
the
driver
enables
RSS
and
configures
one
RSS
Receive
queue
per
CPU
core.
The
number
of
RSS
Receive
queues
is
changed
using
kenv
to
modify
the
kernel
environment
variable
hw.sfxge.<n>.max_rss_channels
.
The
driver
must
be
reloaded
after
the
change
using
the
kldload
command.