
Solarflare
Server
Adapter
User
Guide
SR
‐
IOV
Virtualization
Using
KVM
Issue
20
©
Solarflare
Communications
2017
341
•
Because
there
is
no
VF
present
in
a
VM,
Onload
and
other
Solarflare
applications
such
as
SolarCapture
cannot
be
used
in
the
VM.
KVM
Libvirt
Direct
Passthrough
‐
Configuration
1
Ensure
the
Solarflare
adapter
driver
(sfc.ko)
is
installed
on
the
host.
2
In
the
host,
configure
the
switch
‐
mode,
PF
and
VFs:
#
sfboot
switch
‐
mode=sriov
pf
‐
count=1
vf
‐
count=4
A
cold
reboot
of
the
server
is
required
when
changes
are
made
using
sfboot
.
3
Create
VFs
in
the
host
(example
uses
PF
eth4):
echo
2
>
/sys/class/net/eth4/device/sriov_numvfs
cat
/sys/class/net/eth4/device/sriov_totalvfs
For
Linux
versions
earlier
than
RHEL6.5
see
.
4
PFs
and
VFs
will
be
visible
using
the
lspci
command
(VFs
in
bold
):
#
lspci
‐
D
‐
d1924:
0000:03:00.0
Ethernet
controller:
Solarflare
Communications
SFC9120
0000:03:00.1
Ethernet
controller:
Solarflare
Communications
SFC9120
0000:03:00.2
Ethernet
controller:
Solarflare
Communications
Device
1903
0000:03:00.3
Ethernet
controller:
Solarflare
Communications
Device
1903
0000:03:00.4
Ethernet
controller:
Solarflare
Communications
Device
1903
0000:03:00.5
Ethernet
controller:
Solarflare
Communications
Device
1903
VFs
will
also
be
listed
using
the
ifconfig
command
(abbreviated
output
below,
from
a
dual
port
adapter,
shows
2
x
PF
and
4
x
VF.
(pf
‐
count=1
vf
‐
count=2).
VFs
are
shown
in
bold
).
eth4
Link
encap:Ethernet
HWaddr
00:0F:53:21:00:60
eth5
Link
encap:Ethernet
HWaddr
00:0F:53:21:00:61
eth6
Link
encap:Ethernet
HWaddr
AE:82:AB:C9:67:49
eth7
Link
encap:Ethernet
HWaddr
86:B4:C8:9E:27:D6
eth8
Link
encap:Ethernet
HWaddr
72:0B:C7:21:E1:59
eth9
Link
encap:Ethernet
HWaddr
D2:B7:68:54:35:A5
5
Create
virtual
machines:
VMs
can
be
created
from
the
standard
Linux
virt
‐
manager
GUI
interface
or
the
equivalent
virsh
command
line
tool.
As
root,
run
the
command
virt
‐
manager
from
a
terminal
to
start
the
GUI
interface.
A
VM
can
also
be
created
from
an
existing
VM
XML
file.
The
following
procedure
assumes
the
VM
is
created.
The
example
procedure
will
create
an
interface
configuration
file
for
each
VF
to
be
passed
through
to
the
VM.
6
For
each
VF
to
be
passed
through
to
a
VM,
create
a
configuration
file
in
the
/etc/sysconfig/network
‐
scripts
directory
i.e.
ifcfg
‐
eth6
:
DEVICE=eth6
TYPE=Ethernet
HWADDR=AE:82:AB:C9:67:49
BOOTPROTO=none
ONBOOT=yes