
Solarflare
Server
Adapter
User
Guide
SR
‐
IOV
Virtualization
Using
KVM
Issue
20
©
Solarflare
Communications
2017
348
7.5
General
Configuration
Enabling
Physical
Functions
Use
the
sfboot
utility
from
the
Solarflare
Linux
Utilities
package
to
create
PFs.
Up
to
16
PF
and
16
MAC
addresses
are
supported
per
adapter
.
sfboot
pf
‐
count=<N>
PF
VLAN
tags
can
also
be
assigned
using
sfboot
.
sfboot
pf
‐
count=4,
pf
‐
vlan=100,110,200,210
The
first
VLAN
tag
is
assigned
to
the
first
function,
thereafter
the
tags
are
applied
to
PFs
in
MAC
address
order.
Enabling
Virtual
Functions
On
RHEL6.5
and
later
versions,
VF
creation
is
controlled
through
sysfs
.
Use
the
following
commands
(example)
to
create
and
view
created
VFs.
echo
2
>
/sys/class/net/eth8/device/sriov_numvfs
cat
/sys/class/net/eth8/device/sriov_totalvfs
On
kernels
not
having
this
control
via
sysfs
the
Solarflare
net
driver
module
option
max_vfs
can
be
used
to
enable
VFs.
The
max_vfs
value
applies
to
all
adapters
and
can
be
set
to
a
single
integer
i.e.
all
adapter
physical
functions
will
have
the
same
number
of
VFs,
or
can
be
set
to
a
comma
separated
list
to
have
different
numbers
of
VFs
per
PF.
The
driver
module
parameter
should
be
enabled
in
a
user
‐
created
file
(e.g.
sfc.conf
)
in
the
/etc/modprobe.d
directory
and
the
sfc
driver
must
be
reloaded
following
changes.
options
sfc
max_vfs=4
options
sfc
max_vfs=2,4,8
When
specified
as
a
comma
separated
list,
the
first
VF
count
is
assigned
to
the
PF
with
the
lowest
index
i.e.
the
lowest
MAC
address,
then
the
PF
with
the
next
highest
MAC
address
etc.
If
the
sfc
driver
option
is
used
to
create
VFs,
reload
the
driver:
modprobe
‐
r
sfc
modprobe
sfc
VLAN
tags
can
be
dynamically
assigned
to
VFs
using
libvirt
commands,
or
using
the
ip
command:
ip
link
vf
NUM
[mac
LLADDR]
[vlan
VLANID]
To
ensure
VLAN
tags
persist
after
reboot,
these
can
be
configured
in
the
VM
XML
file.