forked from kghost/i40e-dkms
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathi40e.7
4545 lines (4543 loc) · 111 KB
/
i40e.7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
.\" Man page generated from reStructuredText.
.
.
.nr rst2man-indent-level 0
.
.de1 rstReportMargin
\\$1 \\n[an-margin]
level \\n[rst2man-indent-level]
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
-
\\n[rst2man-indent0]
\\n[rst2man-indent1]
\\n[rst2man-indent2]
..
.de1 INDENT
.\" .rstReportMargin pre:
. RS \\$1
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
. nr rst2man-indent-level +1
.\" .rstReportMargin post:
..
.de UNINDENT
. RE
.\" indent \\n[an-margin]
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
.nr rst2man-indent-level -1
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
..
.TH "I40E" "7" "August 27, 2024" "" "Linux i40e README"
.SH NAME
i40e \- i40e Linux* Base Driver for the Intel(R) Ethernet 700 Series
.SS Contents
.INDENT 0.0
.IP \(bu 2
\fI\%i40e Linux* Base Driver for the Intel(R) Ethernet 700 Series\fP
.INDENT 2.0
.IP \(bu 2
\fI\%Overview\fP
.IP \(bu 2
\fI\%Related Documentation\fP
.IP \(bu 2
\fI\%Identifying Your Adapter\fP
.IP \(bu 2
\fI\%Important Notes\fP
.IP \(bu 2
\fI\%Building and Installation\fP
.IP \(bu 2
\fI\%Command Line Parameters\fP
.IP \(bu 2
\fI\%Additional Features and Configurations\fP
.IP \(bu 2
\fI\%Performance Optimization\fP
.IP \(bu 2
\fI\%Known Issues/Troubleshooting\fP
.IP \(bu 2
\fI\%Support\fP
.IP \(bu 2
\fI\%License\fP
.IP \(bu 2
\fI\%Trademarks\fP
.UNINDENT
.UNINDENT
.SH OVERVIEW
.sp
This driver supports Linux* kernel versions 2.6.32 and newer. However, some
features may require a newer kernel version. The associated Virtual Function
(VF) driver for this driver is iavf. The associated RDMA driver for this driver
is irdma.
.sp
Driver information can be obtained using ethtool, lspci, and ip. Instructions
on updating ethtool can be found in the section Additional Configurations later
in this document.
.sp
This driver is only supported as a loadable module at this time. Intel is not
supplying patches against the kernel source to allow for static linking of the
drivers.
.sp
For questions related to hardware requirements, refer to the documentation
supplied with your Intel adapter. All hardware requirements listed apply to use
with Linux.
.sp
This driver supports XDP (Express Data Path) on kernel 4.14 and later and
AF_XDP zero\-copy on kernel 4.18 and later. Note that XDP is blocked for frame
sizes larger than 3KB.
.sp
\fBNOTE:\fP
.INDENT 0.0
.INDENT 3.5
1 Gb devices based on the Intel(R) Ethernet Network Connection X722
do not support the following features:
.INDENT 0.0
.IP \(bu 2
Data Center Bridging (DCB)
.IP \(bu 2
QOS
.IP \(bu 2
VMQ
.IP \(bu 2
SR\-IOV
.IP \(bu 2
Task Encapsulation offload (VXLAN, NVGRE)
.IP \(bu 2
Energy Efficient Ethernet (EEE)
.IP \(bu 2
Auto\-media detect
.UNINDENT
.UNINDENT
.UNINDENT
.SH RELATED DOCUMENTATION
.sp
See the \(dqIntel(R) Ethernet Adapters and Devices User Guide\(dq for additional
information on features. It is available on the Intel website at
\fI\%https://cdrdv2.intel.com/v1/dl/getContent/705831\fP\&.
.SH IDENTIFYING YOUR ADAPTER
.sp
This driver is compatible with devices based on the following:
.INDENT 0.0
.IP \(bu 2
Intel(R) Ethernet Controller I710
.IP \(bu 2
Intel(R) Ethernet Controller X710
.IP \(bu 2
Intel(R) Ethernet Controller XL710
.IP \(bu 2
Intel(R) Ethernet Network Connection X722
.IP \(bu 2
Intel(R) Ethernet Controller XXV710
.IP \(bu 2
Intel(R) Ethernet Controller V710
.UNINDENT
.sp
For the best performance, make sure the latest NVM/FW is installed on your
device and that you are using the newest drivers.
.sp
For information on how to identify your adapter, and for the latest NVM/FW
images and Intel network drivers, refer to the Intel Support website at
\fI\%https://www.intel.com/support\fP\&.
.SS SFP+ and QSFP+ Devices
.sp
For information about supported media, refer to this document:
\fI\%http://www.intel.com/content/dam/www/public/us/en/documents/release\-notes/xl710\-ethernet\-controller\-feature\-matrix.pdf\fP
.sp
\fBNOTE:\fP
.INDENT 0.0
.INDENT 3.5
.INDENT 0.0
.IP \(bu 2
Some adapters based on the Intel(R) Ethernet 700 Series only support
Intel Ethernet Optics modules. On these adapters, other modules are not
supported and will not function.
.IP \(bu 2
For connections based on Intel(R) Ethernet 700 Series, support is
dependent on your system board. Please see your vendor for details.
.IP \(bu 2
In all cases Intel recommends using Intel Ethernet Optics; other modules
may function but are not validated by Intel. Contact Intel for supported
media types.
.IP \(bu 2
In systems that do not have adequate airflow to cool the adapter and
optical modules, you must use high temperature optical modules.
.UNINDENT
.UNINDENT
.UNINDENT
.SH IMPORTANT NOTES
.SS TC0 must be enabled when setting up DCB on a switch
.sp
The kernel assumes that TC0 is available, and will disable Priority Flow
Control (PFC) on the device if TC0 is not available. To fix this, ensure TC0 is
enabled when setting up DCB on your switch.
.SS Enabling a VF link if the port is disconnected
.sp
If the physical function (PF) link is down, you can force link up (from the
host PF) on any virtual functions (VF) bound to the PF. Note that this requires
kernel support (Red Hat kernel 3.10.0\-327 or newer, upstream kernel 3.11.0 or
newer) and associated iproute2 user space support.
.sp
For example, to force link up on VF 0 bound to PF eth0:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
ip link set eth0 vf 0 state enable
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
\fBNOTE:\fP
.INDENT 0.0
.INDENT 3.5
If the command does not work, it may not be supported by your system.
.UNINDENT
.UNINDENT
.SS Do not unload port driver if VF with active VM is bound to it
.sp
Do not unload a port\(aqs driver if a Virtual Function (VF) with an active Virtual
Machine (VM) is bound to it. Doing so will cause the port to appear to hang.
Once the VM shuts down, or otherwise releases the VF, the command will complete.
.SS Configuring SR\-IOV for improved network security
.sp
In a virtualized environment, on Intel(R) Ethernet Network Adapters that
support SR\-IOV or Intel(R) Scalable I/O Virtualization (Intel(R) Scalable IOV),
the virtual function (VF) may be subject to malicious behavior.
Software\-generated layer two frames, like IEEE 802.3x (link flow control), IEEE
802.1Qbb (priority based flow\-control), and others of this type, are not
expected and can throttle traffic between the host and the virtual switch,
reducing performance. To resolve this issue, and to ensure isolation from
unintended traffic streams, configure all SR\-IOV or Intel Scalable IOV enabled
ports for VLAN tagging from the administrative interface on the PF. This
configuration allows unexpected, and potentially malicious, frames to be
dropped.
.sp
See \fI\%Configuring VLAN Tagging on SR\-IOV Enabled Adapter Ports\fP later in this README for configuration
instructions.
.SS Firmware Recovery Mode
.sp
A device will enter Firmware Recovery mode if it detects a problem that
requires the firmware to be reprogrammed. When a device is in Firmware Recovery
mode it will not pass traffic or allow any configuration; you can only attempt
to recover the device\(aqs firmware. Refer to the Intel(R) Ethernet Adapters and
Devices User Guide for details on Firmware Recovery Mode and how to recover
from it.
.SH BUILDING AND INSTALLATION
.SS To manually build the driver
.INDENT 0.0
.IP 1. 3
Move the base driver tar file to the directory of your choice.
For example, use \fB/home/username/i40e\fP or \fB/usr/local/src/i40e\fP\&.
.IP 2. 3
Untar/unzip the archive, where \fB<x.x.x>\fP is the version number for the
driver tar file:
.INDENT 3.0
.INDENT 3.5
.sp
.nf
.ft C
tar zxf i40e\-<x.x.x>.tar.gz
.ft P
.fi
.UNINDENT
.UNINDENT
.IP 3. 3
Change to the driver src directory, where <x.x.x> is the version number
for the driver tar:
.INDENT 3.0
.INDENT 3.5
.sp
.nf
.ft C
cd i40e\-<x.x.x>/src/
.ft P
.fi
.UNINDENT
.UNINDENT
.IP 4. 3
Compile the driver module:
.INDENT 3.0
.INDENT 3.5
.sp
.nf
.ft C
make install
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
The binary will be installed as:
.INDENT 3.0
.INDENT 3.5
.sp
.nf
.ft C
/lib/modules/<KERNEL VER>/updates/drivers/net/ethernet/intel/i40e/i40e.ko
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
The install location listed above is the default location. This may differ
for various Linux distributions.
.sp
\fBNOTE:\fP
.INDENT 3.0
.INDENT 3.5
To gather and display additional statistics, use the
\fBI40E_ADD_PROBES\fP pre\-processor macro:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
make CFLAGS_EXTRA=\-DI40E_ADD_PROBES
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
Please note that this additional statistics gathering can impact
performance.
.UNINDENT
.UNINDENT
.sp
\fBNOTE:\fP
.INDENT 3.0
.INDENT 3.5
You may see warnings from depmod related to unknown RDMA symbols
during the make of the OOT base driver. These warnings are normal and
appear because the in\-tree RDMA driver will not work with the OOT base
driver. To address the issue, you need to install the latest OOT versions
of the base and RDMA drivers.
.UNINDENT
.UNINDENT
.IP 5. 3
Load the module using the modprobe command.
.sp
To check the version of the driver and then load it:
.INDENT 3.0
.INDENT 3.5
.sp
.nf
.ft C
modinfo i40e
modprobe i40e [parameter=port1_value,port2_value]
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
Alternately, make sure that any older i40e drivers are removed from the
kernel before loading the new module:
.INDENT 3.0
.INDENT 3.5
.sp
.nf
.ft C
rmmod i40e; modprobe i40e
.ft P
.fi
.UNINDENT
.UNINDENT
.IP 6. 3
Assign an IP address to the interface by entering the following,
where \fB<ethX>\fP is the interface name that was shown in dmesg after
modprobe:
.INDENT 3.0
.INDENT 3.5
.sp
.nf
.ft C
ip address add <IP_address>/<netmask bits> dev <ethX>
.ft P
.fi
.UNINDENT
.UNINDENT
.IP 7. 3
Verify that the interface works. Enter the following, where \fB<IP_address>\fP
is the IP address for another machine on the same subnet as the interface
that is being tested:
.INDENT 3.0
.INDENT 3.5
.sp
.nf
.ft C
ping <IP_address>
.ft P
.fi
.UNINDENT
.UNINDENT
.UNINDENT
.sp
\fBNOTE:\fP
.INDENT 0.0
.INDENT 3.5
For certain distributions like (but not limited to) Red Hat Enterprise
Linux 7 and Ubuntu, once the driver is installed, you may need to update the
initrd/initramfs file to prevent the OS loading old versions of the i40e
driver.
.sp
For Red Hat distributions:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
dracut \-\-force
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
For Ubuntu:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
update\-initramfs \-u
.ft P
.fi
.UNINDENT
.UNINDENT
.UNINDENT
.UNINDENT
.SS To build a binary RPM package of this driver
.sp
\fBNOTE:\fP
.INDENT 0.0
.INDENT 3.5
RPM functionality has only been tested in Red Hat distributions.
.UNINDENT
.UNINDENT
.INDENT 0.0
.IP 1. 3
Run the following command, where \fB<x.x.x>\fP is the version number for the
driver tar file:
.INDENT 3.0
.INDENT 3.5
.sp
.nf
.ft C
rpmbuild \-tb i40e\-<x.x.x>.tar.gz
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
\fBNOTE:\fP
.INDENT 3.0
.INDENT 3.5
For the build to work properly, the currently running kernel MUST
match the version and configuration of the installed kernel sources. If
you have just recompiled the kernel, reboot the system before building.
.UNINDENT
.UNINDENT
.IP 2. 3
After building the RPM, the last few lines of the tool output contain the
location of the RPM file that was built. Install the RPM with one of the
following commands, where \fB<RPM>\fP is the location of the RPM file:
.INDENT 3.0
.INDENT 3.5
.sp
.nf
.ft C
rpm \-Uvh <RPM>
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
or:
.INDENT 3.0
.INDENT 3.5
.sp
.nf
.ft C
dnf/yum localinstall <RPM>
.ft P
.fi
.UNINDENT
.UNINDENT
.IP 3. 3
If your distribution or kernel does not contain inbox support for auxiliary
bus, you must also install the auxiliary RPM:
.INDENT 3.0
.INDENT 3.5
.sp
.nf
.ft C
rpm \-Uvh <i40e RPM> <auxiliary RPM>
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
or:
.INDENT 3.0
.INDENT 3.5
.sp
.nf
.ft C
dnf/yum localinstall <i40e RPM> <auxiliary RPM>
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
\fBNOTE:\fP
.INDENT 3.0
.INDENT 3.5
On some distributions, the auxiliary RPM may fail to install due
to missing kernel\-devel headers. To workaround this issue, specify
\fB\-\-excludepath\fP during installation. For example:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
rpm \-Uvh auxiliary\-1.0.0\-1.x86_64.rpm \-\-excludepath=/lib/modules/3.10.0\-957.el7.x86_64/source/include/linux/auxiliary_bus.h
.ft P
.fi
.UNINDENT
.UNINDENT
.UNINDENT
.UNINDENT
.UNINDENT
.sp
\fBNOTE:\fP
.INDENT 0.0
.INDENT 3.5
.INDENT 0.0
.IP \(bu 2
To compile the driver on some kernel/arch combinations, you may need to
install a package with the development version of libelf (e.g. libelf\-dev,
libelf\-devel, elfutils\-libelf\-devel).
.IP \(bu 2
When compiling an out\-of\-tree driver, details will vary by distribution.
However, you will usually need a kernel\-devel RPM or some RPM that provides
the kernel headers at a minimum. The RPM kernel\-devel will usually fill in
the link at \fB/lib/modules/\(aquname \-r\(aq/build\fP\&.
.UNINDENT
.UNINDENT
.UNINDENT
.SH COMMAND LINE PARAMETERS
.sp
If the driver is built as a module, enter optional parameters on the command
line with the following syntax:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
modprobe i40e [<option>=<VAL1>]
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
There needs to be a \fB<VAL#>\fP for each network port in the system supported by
this driver. The values will be applied to each instance, in function order.
For example:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
modprobe i40e max_vfs=7
.ft P
.fi
.UNINDENT
.UNINDENT
.INDENT 0.0
.IP \(bu 2
The i40e driver only supports the \fBmax_vfs\fP kernel parameter on older
kernels that do not have the standard sysfs interface.
.IP \(bu 2
The only other module parameter supported is the \fBdebug\fP parameter that can
control the default logging verbosity of the driver.
.IP \(bu 2
In general, use ethtool and other OS\-specific commands to configure
user\-changeable parameters after the driver is loaded.
.IP \(bu 2
The default value for each parameter is generally the recommended setting,
unless otherwise noted.
.UNINDENT
.SS max_vfs
.sp
This parameter adds support for SR\-IOV. It causes the driver to spawn up to
max_vfs worth of virtual functions.
.sp
Valid Range:
.INDENT 0.0
.IP \(bu 2
1\-32 (Intel Ethernet Controller X710 based devices)
.IP \(bu 2
1\-64 (Intel Ethernet Controller XXV710/XL710 based devices)
.UNINDENT
.sp
\fBNOTE:\fP
.INDENT 0.0
.INDENT 3.5
This parameter is only used on kernel 3.7.x and below. On kernel 3.8.x
and above, use sysfs to enable VFs. Use sysfs for Red Hat distributions.
.UNINDENT
.UNINDENT
.sp
For example, you can create 4 VFs as follows:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
echo 4 > /sys/class/net/<ethX>/device/sriov_numvfs
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
To disable VFs, write 0 to the same file:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
echo 0 > /sys/class/net/<ethX>/device/sriov_numvfs
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
The parameters for the driver are referenced by position. Thus, if you have a
dual port adapter, or more than one adapter in your system, and want N virtual
functions per port, you must specify a number for each port with each parameter
separated by a comma. For example, the following will spawn 4 VFs on the first
port:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
modprobe i40e max_vfs=4
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
The following will spawn 2 VFs on the first port and 4 VFs on the second port:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
modprobe i40e max_vfs=2,4
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
\fBNOTE:\fP
.INDENT 0.0
.INDENT 3.5
.INDENT 0.0
.IP \(bu 2
Caution must be used in loading the driver with these parameters.
Depending on your system configuration, number of slots, etc., it is
impossible to predict in all cases where the positions would be on the
command line.
.IP \(bu 2
Neither the device nor the driver control how VFs are mapped into config
space. Bus layout will vary by operating system. On operating systems
that support it, you can check sysfs to find the mapping.
.UNINDENT
.UNINDENT
.UNINDENT
.sp
Some hardware configurations support fewer SR\-IOV instances, as the whole Intel
Ethernet Controller XL710 (all functions) is limited to 128 SR\-IOV interfaces
in total.
.sp
\fBNOTE:\fP
.INDENT 0.0
.INDENT 3.5
When SR\-IOV mode is enabled, hardware VLAN filtering and VLAN tag
stripping/insertion will remain enabled. Please remove the old VLAN filter
before the new VLAN filter is added. For example:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
ip link set eth0 vf 0 vlan 100 // set vlan 100 for VF 0
ip link set eth0 vf 0 vlan 0 // Delete vlan 100
ip link set eth0 vf 0 vlan 200 // set a new vlan 200 for VF 0
.ft P
.fi
.UNINDENT
.UNINDENT
.UNINDENT
.UNINDENT
.SH ADDITIONAL FEATURES AND CONFIGURATIONS
.SS ethtool
.sp
The driver utilizes the ethtool interface for driver configuration and
diagnostics, as well as displaying statistical information. The latest ethtool
version is required for this functionality. Download it at:
\fI\%https://kernel.org/pub/software/network/ethtool/\fP
.SS Viewing Link Messages
.sp
Link messages will not be displayed to the console if the distribution is
restricting system messages. In order to see network driver link messages on
your console, set dmesg to eight by entering the following:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
dmesg \-n 8
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
\fBNOTE:\fP
.INDENT 0.0
.INDENT 3.5
This setting is not saved across reboots.
.UNINDENT
.UNINDENT
.SS Configuring the Driver on Different Distributions
.sp
Configuring a network driver to load properly when the system is started is
distribution dependent. Typically, the configuration process involves adding an
alias line to \fB/etc/modules.conf\fP or \fB/etc/modprobe.conf\fP as well as editing
other system startup scripts and/or configuration files. Many popular Linux
distributions ship with tools to make these changes for you.
.sp
To learn the proper way to configure a network device for your system, refer to
your distribution documentation. If during this process you are asked for the
driver or module name, the name for the Base Driver is i40e.
.SS Displaying VF Statistics on the PF
.sp
Use the following command to display the statistics for all VFs on the PF:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
ethtool \-S <ethX>
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
\fBNOTE:\fP
.INDENT 0.0
.INDENT 3.5
The output of this command can be very large due to the large number
of VF statistics and the maximum number of possible VFs.
.UNINDENT
.UNINDENT
.sp
The PF driver will display a subset of the statistics for the PF and for all
VFs that are configured. The PF will always print a statistics block for each
of the possible VFs, and it will show zero for all unconfigured VFs.
.sp
VF stats are listed in a single block at the end of the PF statistics, using
the following naming convention:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
vf<XXX>.<statistic name>
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
Where:
.INDENT 0.0
.TP
.B <XXX>
The VF number (for example, vf008)
.TP
.B <statistic name>
The name of the statistic as supplied by the VF driver
.UNINDENT
.sp
For example:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
vf008.rx_bytes: 0
vf008.rx_unicast: 0
vf008.rx_multicast: 0
vf008.rx_broadcast: 0
vf008.rx_discards: 0
vf008.rx_unknown_protocol: 0
vf008.tx_bytes: 0
vf008.tx_unicast: 0
vf008.tx_multicast: 0
vf008.tx_broadcast: 0
vf008.tx_discards: 0
vf008.tx_errors: 0
.ft P
.fi
.UNINDENT
.UNINDENT
.SS Configuring VLAN Tagging on SR\-IOV Enabled Adapter Ports
.sp
To configure VLAN tagging for the ports on an SR\-IOV enabled adapter, use the
following command. The VLAN configuration should be done before the VF driver
is loaded or the VM is booted. The VF is not aware of the VLAN tag being
inserted on transmit and removed on received frames (sometimes called \(dqport
VLAN\(dq mode).
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
ip link set dev <ethX> vf <id> vlan <vlan id>
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
For example, the following will configure PF eth0 and the first VF on VLAN 10:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
ip link set dev eth0 vf 0 vlan 10
.ft P
.fi
.UNINDENT
.UNINDENT
.SS Setting the MAC Address for a VF
.sp
To change the MAC address for the specified VF:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
ip link set <ethX> vf 0 mac <address>
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
For example:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
ip link set <ethX> vf 0 mac 00:01:02:03:04:05
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
This setting lasts until the PF is reloaded.
.sp
\fBNOTE:\fP
.INDENT 0.0
.INDENT 3.5
For untrusted VFs, assigning a MAC address for a VF from the host
will disable any subsequent requests to change the MAC address from within
the VM. This is a security feature. The VM is not aware of this restriction,
so if this is attempted in the VM, it will trigger MDD events. Trusted VFs
are allowed to change the MAC address from within the VM.
.UNINDENT
.UNINDENT
.SS Trusted VFs and VF Promiscuous Mode
.sp
This feature allows you to designate a particular VF as trusted and allows that
trusted VF to request selective promiscuous mode on the Physical Function (PF).
.sp
To set a VF as trusted or untrusted, enter the following command in the
Hypervisor:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
ip link set dev <ethX> vf 1 trust [on|off]
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
\fBNOTE:\fP
.INDENT 0.0
.INDENT 3.5
It\(aqs important to set the VF to trusted before setting promiscuous
mode. If the VM is not trusted, the PF will ignore promiscuous mode requests
from the VF. If the VM becomes trusted after the VF driver is loaded, you
must make a new request to set the VF to promiscuous.
.UNINDENT
.UNINDENT
.sp
Once the VF is designated as trusted, use the following commands in the VM to
set the VF to promiscuous mode.
.INDENT 0.0
.IP \(bu 2
For promiscuous all, use the following, where \fB<ethX>\fP is a VF interface
in the VM:
.INDENT 2.0
.INDENT 3.5
.sp
.nf
.ft C
ip link set <ethX> promisc on
.ft P
.fi
.UNINDENT
.UNINDENT
.IP \(bu 2
For promiscuous multicast:
.INDENT 2.0
.INDENT 3.5
.sp
.nf
.ft C
ip link set <ethX> allmulticast on
.ft P
.fi
.UNINDENT
.UNINDENT
.UNINDENT
.sp
\fBNOTE:\fP
.INDENT 0.0
.INDENT 3.5
By default, the ethtool private flag \fBvf\-true\-promisc\-support\fP is
set to \(dqoff,\(dq meaning that promiscuous mode for the VF will be limited. To
set the promiscuous mode for the VF to true promiscuous and allow the VF to
see all ingress traffic, use the following command:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
ethtool \-\-set\-priv\-flags <ethX> vf\-true\-promisc\-support on
.ft P
.fi
.UNINDENT
.UNINDENT
.UNINDENT
.UNINDENT
.sp
The \fBvf\-true\-promisc\-support\fP private flag does not enable promiscuous mode;
rather, it designates which type of promiscuous mode (limited or true) you will
get when you enable promiscuous mode using the \fBip link\fP commands above. Note
that this is a global setting that affects the entire device. However, the
\fBvf\-true\-promisc\-support\fP private flag is only exposed to the first PF of the
device. The PF remains in limited promiscuous mode (unless it is in MFP mode)
regardless of the \fBvf\-true\-promisc\-support\fP setting.
.sp
Next, add a VLAN interface on the VF interface. For example:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
ip link add link eth2 name eth2.100 type vlan id 100
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
Note that the order in which you set the VF to promiscuous mode and add the
VLAN interface does not matter (you can do either first). The result in this
example is that the VF will get all traffic that is tagged with VLAN 100.
.SS Virtual Function (VF) Tx Rate Limit
.sp
Use the ip command to configure the Tx rate limit for a VF from the PF
interface.
.sp
For example, to set a Tx rate limit of 1000Mbps for VF 0:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
ip link set eth0 vf 0 rate 1000
.ft P
.fi
.UNINDENT
.UNINDENT
.SS Malicious Driver Detection (MDD) for VFs
.sp
Some Intel Ethernet devices use Malicious Driver Detection (MDD) to detect
malicious traffic from the VF and disable Tx/Rx queues or drop the offending
packet until a VF driver reset occurs. You can view MDD messages in the PF\(aqs
system log using the dmesg command.
.INDENT 0.0
.IP \(bu 2
If the PF driver logs MDD events from the VF, confirm that the correct VF
driver is installed.
.IP \(bu 2
To restore functionality, you can manually reload the VF or VM or enable
automatic VF resets.
.IP \(bu 2
When automatic VF resets are enabled, the PF driver will immediately reset
the VF and reenable queues when it detects MDD events on the receive path.
.IP \(bu 2
If automatic VF resets are disabled, the PF will not automatically reset the
VF when it detects MDD events.
.UNINDENT
.sp
To enable or disable automatic VF resets, use the following command:
.INDENT 0.0
.INDENT 3.5