Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
GVE(4)			    Kernel Interfaces Manual			GVE(4)

NAME
       gve -- Ethernet driver for Google Virtual NIC (gVNIC)

SYNOPSIS
       To  compile  this  driver into the kernel, place	the following lines in
       your kernel configuration file:

	     device gve

       Alternatively, to load the driver as a module at	boot time,  place  the
       following line in loader.conf(5):

	     if_gve_load="YES"

DESCRIPTION
       gVNIC  is  a virtual network interface designed specifically for	Google
       Compute Engine (GCE).  It is required to	support	per-VM Tier-1 network-
       ing performance,	and for	using certain VM shapes	on GCE.

       gve is the driver for gVNIC.  It	supports the following features:

          RX checksum offload
          TX chesksum offload
          TCP Segmentation Offload (TSO)
          Large Receive Offload (LRO) in software
          Jumbo frames
          Receive Side	Scaling	(RSS)

       For more	information on configuring this	device,	see ifconfig(8).

HARDWARE
       gve binds to a single PCI device	ID presented by	gVNIC:

          0x1AE0:0x0042

EXAMPLES
       Change the TX queue count to 4 for the gve0 interface:
	     sysctl dev.gve.0.num_tx_queues=4

       Change the RX queue count to 4 for the gve0 interface:
	     sysctl dev.gve.0.num_rx_queues=4

       Change the TX ring size to 512 for the gve0 interface:
	     sysctl dev.gve.0.tx_ring_size=512

       Change the RX ring size to 512 for the gve0 interface:
	     sysctl dev.gve.0.rx_ring_size=512

DIAGNOSTICS
       The following messages are recorded during driver initialization:

       Enabled MSIX with %d vectors
       Configured device resources
       Successfully attached %s
       Deconfigured device resources

       These  messages	are  seen  if  driver  initialization  fails.	Global
       (across-queues) allocation failures:

       Failed to configure device resources: err=%d
       No compatible queue formats
       Failed to allocate ifnet	struct
       Failed to allocate admin	queue mem
       Failed to alloc DMA mem for DescribeDevice
       Failed to allocate QPL page

       irq and BAR allocation failures:

       Failed to acquire any msix vectors
       Tried to	acquire	%d msix	vectors, got only %d
       Failed to setup irq %d for Tx queue %d
       Failed to setup irq %d for Rx queue %d
       Failed to allocate irq %d for mgmnt queue
       Failed to setup irq %d for mgmnt	queue, err: %d
       Failed to allocate BAR0
       Failed to allocate BAR2
       Failed to allocate msix table

       Rx queue-specific allocation failures:

       No QPL left for rx ring %d
       Failed to alloc queue resources for rx ring %d
       Failed to alloc desc ring for rx	ring %d
       Failed to alloc data ring for rx	ring %d

       Tx queue-specific allocation failures:

       No QPL left for tx ring %d
       Failed to alloc queue resources for tx ring %d
       Failed to alloc desc ring for tx	ring %d
       Failed to vmap fifo, qpl_id = %d

       The following messages are recorded when	the interface detach fails:

       Failed to deconfigure device resources: err=%d

       If  bootverbose is on, the following messages are recorded when the in-
       terface is being	brought	up:

       Created %d rx queues
       Created %d tx queues
       MTU set to %d

       The following messages are recorded when	the interface is being brought
       down:

       Destroyed %d rx queues
       Destroyed %d tx queues

       These messages are seen if errors are encountered when bringing the in-
       terface up or down:

       Failed to destroy rxq %d, err: %d
       Failed to destroy txq %d, err: %d
       Failed to create	rxq %d,	err: %d
       Failed to create	txq %d,	err: %d
       Failed to set MTU to %d
       Invalid new MTU setting.	new mtu: %d max	mtu: %d	min mtu: %d
       Cannot bring the	iface up when detached
       Reached max number of registered	pages %lu > %lu
       Failed to init lro for rx ring %d

       These messages are seen if any admin queue command fails:

       AQ command(%u): failed with status %d
       AQ command(%u): unknown status code %d
       AQ commands timed out, need to reset AQ
       Unknown AQ command opcode %d

       These messages appear if	a TX timeout is	detected:

       Found %d	timed out packet(s) on txq%d, kicking it for completions
       Found %d	timed out packet(s) on txq%d with its last kick	 %ld  sec  ago
       which is	less than the cooldown period %d. Resetting device

       These  messages	are  recorded when the device is being reset due to an
       error:

       Scheduling reset	task!
       Waiting until admin queue is released.
       Admin queue released

       If it was the NIC that requested	the reset, this	message	is recorded:

       Device requested	reset

       If the reset fails during the reinitialization phase, this  message  is
       recorded:

       Restore failed!

       These  two  messages  correspond	to the NIC alerting the	driver to link
       state changes:

       Device link is up.
       Device link is down.

       Apart from these	messages, the driver exposes per-queue packet and  er-
       ror  counters  as sysctl	nodes.	Global (across queues) counters	can be
       read using netstat(1).

SYSCTL VARIABLES
       gve exposes the following sysctl(8) variables:

       hw.gve.driver_version
	       The driver version.  This is read-only.

       hw.gve.queue_format
	       The queue format	in use.	 This is read-only.

       hw.gve.disable_hw_lro
	       Setting this boot-time tunable to 1 disables Large Receive  Of-
	       fload  (LRO)  in	 the NIC.  The default value is	0, which means
	       hardware	LRO is enabled by default.  The	software LRO stack  in
	       the  kernel  is	always used.  This sysctl variable needs to be
	       set before loading the driver, using loader.conf(5).

       hw.gve.allow_4k_rx_buffers
	       Setting this boot-time tunable to 1 enables support for	4K  RX
	       Buffers.	  The  default	value  is 0, which means 2K RX Buffers
	       will be used.  4K RX Buffers are	only supported on DQO_RDA  and
	       DQO_QPL	queue  formats.	  When	enabled, 4K RX Buffers will be
	       used either when	HW LRO is enabled or mtu is greated than 2048.
	       This sysctl variable needs to be	set before loading the driver,
	       using loader.conf(5).

       dev.gve.X.num_rx_queues and dev.gve.X.num_tx_queues
	       Run-time	tunables that represent	the number of  currently  used
	       RX/TX  queues.	The  default  value is the max number of RX/TX
	       queues the device can support.

	       This call turns down the	interface while	 setting  up  the  new
	       queues,	which  may  potentially	 cause	any  new packets to be
	       dropped.	 This call can fail if the system is not able to  pro-
	       vide  the driver	with enough resources.	In that	situation, the
	       driver will revert to the previous number of RX/TX queues.   If
	       this also fails,	a device reset will be triggered.

	       Note:  sysctl  nodes for	queue stats remain available even if a
	       queue is	removed.

       dev.gve.X.rx_ring_size and dev.gve.X.tx_ring_size
	       Run-time	tunables that represent	 the  current  ring  size  for
	       RX/TX  queues.  The default value is set	to device defaults for
	       ring size.

	       This call turns down the	interface while	setting	up the	queues
	       with  the  new  ring  size, which may potentially cause any new
	       packets to be dropped.  This call can fail if the system	is not
	       able to provide the driver with enough resources.  In that sit-
	       uation, the driver will try to revert to	the previous ring size
	       for RX/TX queues.  If this also fails, the device will be in an
	       unhealthy state and will	need to	be reloaded.  This value  must
	       be a power of 2 and within the defined range.

LIMITATIONS
       gve  does  not  support	the  transmission of VLAN-tagged packets.  All
       VLAN-tagged traffic is dropped.

QUEUE FORMATS
       gve features different datapath modes called queue formats:

          GQI_QPL: "QPL" stands for "Queue Page List" and refers to the  fact
	   that	hardware expects a fixed bounce	buffer and cannot access arbi-
	   trary  memory.  GQI is the older descriptor format.	The G in "GQI"
	   refers to an	older generation of hardware, and the "QI" stands  for
	   "Queue In-order" referring to the fact that the NIC sends Tx	and Rx
	   completions in the same order as the	one in which the corresponding
	   descriptors were posted by the driver.
          DQO_RDA:  DQO is the	descriptor format required to take full	advan-
	   tage	of next	generation VM shapes.  "RDA" stands for	"Raw  DMA  Ad-
	   dressing" and refers	to the fact that hardware can work with	DMA-ed
	   packets  and	 does  not  expect  them to be copied into or out of a
	   fixed bounce	buffer.	 The D in "DQO"	refers to a  newer  generation
	   of hardware,	and the	"QO" stands for	"Queue Out-of-order" referring
	   to the fact that the	NIC might send Tx and Rx completions in	an or-
	   der	different  from	the one	in which the corresponding descriptors
	   were	posted by the driver.
          DQO_QPL: The	next generation	descriptor format in the "QPL" mode.

SUPPORT
       Please email gvnic-drivers@google.com with the specifics	of  the	 issue
       encountered.

SEE ALSO
       netstat(1), loader.conf(5), ifconfig(8),	sysctl(8)

HISTORY
       The gve device driver first appeared in FreeBSD 13.3.

AUTHORS
       The gve driver was written by Google.

FreeBSD	15.0			 May 20, 2025				GVE(4)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=gve&sektion=4&manpath=FreeBSD+15.0-RELEASE+and+Ports>

home | help