xref: /freebsd/share/man/man4/vtnet.4 (revision fa9896e082a1046ff4fbc75fcba4d18d1f2efc19)
110b59a9bSPeter Grehan.\" Copyright (c) 2011 Bryan Venteicher
210b59a9bSPeter Grehan.\" All rights reserved.
310b59a9bSPeter Grehan.\"
410b59a9bSPeter Grehan.\" Redistribution and use in source and binary forms, with or without
510b59a9bSPeter Grehan.\" modification, are permitted provided that the following conditions
610b59a9bSPeter Grehan.\" are met:
710b59a9bSPeter Grehan.\" 1. Redistributions of source code must retain the above copyright
810b59a9bSPeter Grehan.\"    notice, this list of conditions and the following disclaimer.
910b59a9bSPeter Grehan.\" 2. Redistributions in binary form must reproduce the above copyright
1010b59a9bSPeter Grehan.\"    notice, this list of conditions and the following disclaimer in the
1110b59a9bSPeter Grehan.\"    documentation and/or other materials provided with the distribution.
1210b59a9bSPeter Grehan.\"
1310b59a9bSPeter Grehan.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
1410b59a9bSPeter Grehan.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1510b59a9bSPeter Grehan.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1610b59a9bSPeter Grehan.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
1710b59a9bSPeter Grehan.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1810b59a9bSPeter Grehan.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
1910b59a9bSPeter Grehan.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2010b59a9bSPeter Grehan.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2110b59a9bSPeter Grehan.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2210b59a9bSPeter Grehan.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2310b59a9bSPeter Grehan.\" SUCH DAMAGE.
2410b59a9bSPeter Grehan.\"
2528083eaaSChristian Brueffer.Dd January 22, 2012
2610b59a9bSPeter Grehan.Dt VTNET 4
2710b59a9bSPeter Grehan.Os
2810b59a9bSPeter Grehan.Sh NAME
2910b59a9bSPeter Grehan.Nm vtnet
3010b59a9bSPeter Grehan.Nd VirtIO Ethernet driver
3110b59a9bSPeter Grehan.Sh SYNOPSIS
3210b59a9bSPeter GrehanTo compile this driver into the kernel,
3310b59a9bSPeter Grehanplace the following lines in your
3410b59a9bSPeter Grehankernel configuration file:
3510b59a9bSPeter Grehan.Bd -ragged -offset indent
36c23a7a1eSBryan Venteicher.Cd "device vtnet"
3710b59a9bSPeter Grehan.Ed
3810b59a9bSPeter Grehan.Pp
3910b59a9bSPeter GrehanAlternatively, to load the driver as a
4010b59a9bSPeter Grehanmodule at boot time, place the following line in
4110b59a9bSPeter Grehan.Xr loader.conf 5 :
4210b59a9bSPeter Grehan.Bd -literal -offset indent
4310b59a9bSPeter Grehanif_vtnet_load="YES"
4410b59a9bSPeter Grehan.Ed
4510b59a9bSPeter Grehan.Sh DESCRIPTION
4610b59a9bSPeter GrehanThe
4710b59a9bSPeter Grehan.Nm
4810b59a9bSPeter Grehandevice driver provides support for VirtIO Ethernet devices.
4910b59a9bSPeter Grehan.Pp
50*8214b194SGordon BerglingIf the hypervisor advertises the appropriate features, the
5110b59a9bSPeter Grehan.Nm
5210b59a9bSPeter Grehandriver supports TCP/UDP checksum offload for both transmit and receive,
53da382a8cSPoul-Henning KampTCP segmentation offload (TSO), TCP large receive offload (LRO),
54da382a8cSPoul-Henning Kamphardware VLAN tag stripping/insertion features, a multicast hash filter,
55da382a8cSPoul-Henning Kampas well as Jumbo Frames (up to 9216 bytes), which can be
5610b59a9bSPeter Grehanconfigured via the interface MTU setting.
5710b59a9bSPeter GrehanSelecting an MTU larger than 1500 bytes with the
5810b59a9bSPeter Grehan.Xr ifconfig 8
5910b59a9bSPeter Grehanutility configures the adapter to receive and transmit Jumbo Frames.
6010b59a9bSPeter Grehan.Pp
6110b59a9bSPeter GrehanFor more information on configuring this device, see
6210b59a9bSPeter Grehan.Xr ifconfig 8 .
6310b59a9bSPeter Grehan.Sh LOADER TUNABLES
6410b59a9bSPeter GrehanTunables can be set at the
6510b59a9bSPeter Grehan.Xr loader 8
6610b59a9bSPeter Grehanprompt before booting the kernel or stored in
6710b59a9bSPeter Grehan.Xr loader.conf 5 .
6810b59a9bSPeter Grehan.Bl -tag -width "xxxxxx"
6910b59a9bSPeter Grehan.It Va hw.vtnet.csum_disable
708f3600b1SBryan Venteicher.It Va hw.vtnet. Ns Ar X Ns Va .csum_disable
7128083eaaSChristian BruefferThis tunable disables receive and send checksum offload.
7228083eaaSChristian BruefferThe default value is 0.
7310b59a9bSPeter Grehan.It Va hw.vtnet.tso_disable
748f3600b1SBryan Venteicher.It Va hw.vtnet. Ns Ar X Ns Va .tso_disable
7528083eaaSChristian BruefferThis tunable disables TSO.
7628083eaaSChristian BruefferThe default value is 0.
7710b59a9bSPeter Grehan.It Va hw.vtnet.lro_disable
788f3600b1SBryan Venteicher.It Va hw.vtnet. Ns Ar X Ns Va .lro_disable
7928083eaaSChristian BruefferThis tunable disables LRO.
8028083eaaSChristian BruefferThe default value is 0.
818f3600b1SBryan Venteicher.It Va hw.vtnet.mq_disable
828f3600b1SBryan Venteicher.It Va hw.vtnet. Ns Ar X Ns Va .mq_disable
838f3600b1SBryan VenteicherThis tunable disables multiqueue.
848f3600b1SBryan VenteicherThe default value is 0.
858f3600b1SBryan Venteicher.It Va hw.vtnet.mq_max_pairs
868f3600b1SBryan Venteicher.It Va hw.vtnet. Ns Ar X Ns Va .mq_max_pairs
878f3600b1SBryan VenteicherThis tunable sets the maximum number of transmit and receive queue pairs.
888f3600b1SBryan VenteicherMultiple queues are only supported when the Multiqueue feature is negotiated.
898f3600b1SBryan VenteicherThis driver supports a maximum of 8 queue pairs.
908f3600b1SBryan VenteicherThe number of queue pairs used is the lesser of the maximum supported by the
918f3600b1SBryan Venteicherdriver and the hypervisor, the number of CPUs present in the guest, and this
928f3600b1SBryan Venteichertunable if not zero.
938f3600b1SBryan VenteicherThe default value is 0.
9410b59a9bSPeter Grehan.El
9510b59a9bSPeter Grehan.Sh SEE ALSO
9610b59a9bSPeter Grehan.Xr arp 4 ,
9710b59a9bSPeter Grehan.Xr netintro 4 ,
9810b59a9bSPeter Grehan.Xr ng_ether 4 ,
9910b59a9bSPeter Grehan.Xr virtio 4 ,
10028083eaaSChristian Brueffer.Xr vlan 4 ,
10110b59a9bSPeter Grehan.Xr ifconfig 8
10210b59a9bSPeter Grehan.Sh HISTORY
10310b59a9bSPeter GrehanThe
10410b59a9bSPeter Grehan.Nm
10510b59a9bSPeter Grehandriver was written by
1066c899950SBaptiste Daroussin.An Bryan Venteicher Aq Mt bryanv@FreeBSD.org .
10710b59a9bSPeter GrehanIt first appeared in
10810b59a9bSPeter Grehan.Fx 9.0 .
10910b59a9bSPeter Grehan.Sh CAVEATS
11010b59a9bSPeter GrehanThe
11110b59a9bSPeter Grehan.Nm
11210b59a9bSPeter Grehandriver only supports LRO when the hypervisor advertises the
11310b59a9bSPeter Grehanmergeable buffer feature.
114