xref: /dpdk/doc/guides/nics/gve.rst (revision 0d4ea0b303c5cb09ea53fea7b43f361b21c7e4ea)
1.. SPDX-License-Identifier: BSD-3-Clause
2   Copyright(C) 2022 Intel Corporation.
3
4GVE poll mode driver
5====================
6
7The GVE PMD (**librte_net_gve**) provides poll mode driver support for
8Google Virtual Ethernet device (also called as gVNIC).
9
10gVNIC is the standard virtual Ethernet interface on Google Cloud Platform (GCP),
11which is one of the multiple virtual interfaces from those leading CSP
12customers in the world.
13
14Please refer to https://cloud.google.com/compute/docs/networking/using-gvnic
15for the device description.
16
17Having a well maintained/optimized gve PMD on DPDK community can help those
18cloud instance consumers with better experience of performance, maintenance
19who wants to run their own VNFs on GCP.
20
21The base code is under MIT license and based on GVE kernel driver v1.3.0.
22GVE base code files are:
23
24- gve_adminq.h
25- gve_adminq.c
26- gve_desc.h
27- gve_desc_dqo.h
28- gve_register.h
29- gve.h
30
31Please refer to https://github.com/GoogleCloudPlatform/compute-virtual-ethernet-linux/tree/v1.3.0/google/gve
32to find the original base code.
33
34GVE has 3 queue formats:
35
36- GQI_QPL - GQI with queue page list
37- GQI_RDA - GQI with raw DMA addressing
38- DQO_RDA - DQO with raw DMA addressing
39
40GQI_QPL queue format is queue page list mode.
41Driver needs to allocate memory and register this memory
42as a Queue Page List (QPL) in hardware (Google Hypervisor/GVE Backend) first.
43Each queue has its own QPL.
44Then Tx needs to copy packets to QPL memory
45and put this packet's offset in the QPL memory into hardware descriptors
46so that hardware can get the packets data.
47And Rx needs to read descriptors of offset in QPL to get QPL address
48and copy packets from the address to get real packets data.
49
50GQI_RDA queue format works like usual NICs
51that driver can put packets' physical address into hardware descriptors.
52
53DQO_RDA queue format has submission and completion queue pair
54for each Tx/Rx queue.
55And similar as GQI_RDA,
56driver can put packets' physical address into hardware descriptors.
57
58Please refer to https://www.kernel.org/doc/html/latest/networking/device_drivers/ethernet/google/gve.html
59to get more information about GVE queue formats.
60
61Features and Limitations
62------------------------
63
64In this release, the GVE PMD provides the basic functionality
65of packet reception and transmission.
66Supported features of the GVE PMD are:
67
68- Multiple queues for Tx and Rx
69- TSO offload
70- Link state information
71- Tx multi-segments (Scatter Tx)
72- Tx UDP/TCP/SCTP Checksum
73- RSS hash configuration
74- RSS redirection table query and update
75
76Currently, only GQI_QPL and GQI_RDA queue format are supported in PMD.
77Jumbo Frame is not supported in PMD for now.
78It'll be added in a future DPDK release.
79Also, only GQI_QPL queue format is in use on GCP
80since GQI_RDA hasn't been released in production.
81
82RSS
83^^^
84
85GVE RSS can be enabled and configured using the standard interfaces.
86The driver does not support querying the initial RSS configuration.
87
88The RSS hash key must be exactly 40 bytes.
89Upon RSS hash configuration, a default redirection table will be set
90using a round-robin assignment of hash values to queues.
91The default GVE redirection table has 128 entries.
92
93Note that the initial configuration requires a hash key to be provided
94if one had not been provided before.
95Attempting to set hash types alone without the existence of a set key
96will result in a failed request.
97
98As stated above, the RSS redirection table has exactly 128 entries.
99The RSS hash must be configured before the redirection table can be updated
100using the standard interface.
101Because the initial RSS hash creates a default redirection table,
102the redirection table will be available for querying upon initial hash configuration.
103When performing redirection table updates,
104it is possible to update individual table entries.
105