gve: Add adminq extended command
authorJeroen de Borst <jeroendb@google.com>
Tue, 25 Jun 2024 00:12:28 +0000 (00:12 +0000)
committerJakub Kicinski <kuba@kernel.org>
Wed, 26 Jun 2024 00:48:33 +0000 (17:48 -0700)
commitfcfe6318dbac45e6c3c5c7a40f5dd5c08600a5e9
treed6d913118c835a3ae284bf4c7932a6208e0b3c3d
parent1108566ca509e67aa8abfbf914b1cd31e9ff51f8
gve: Add adminq extended command

The adminq command is limited to 64 bytes per entry and it's 56 bytes
for the command itself at maximum. To support larger commands, we need
to dma_alloc a separate memory to put the command in that memory and
send the dma memory address instead of the actual command.

Introduce an extended adminq command to wrap the real command with the
inner opcode and the allocated dma memory address specified. Once the
device receives it, it can get the real command from the given dma
memory address. As designed with the device, all the extended commands
will use inner opcode larger than 0xFF.

Signed-off-by: Jeroen de Borst <jeroendb@google.com>
Co-developed-by: Ziwei Xiao <ziweixiao@google.com>
Signed-off-by: Ziwei Xiao <ziweixiao@google.com>
Reviewed-by: Praveen Kaligineedi <pkaligineedi@google.com>
Reviewed-by: Harshitha Ramamurthy <hramamurthy@google.com>
Reviewed-by: Willem de Bruijn <willemb@google.com>
Link: https://patch.msgid.link/20240625001232.1476315-3-ziweixiao@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/google/gve/gve_adminq.c
drivers/net/ethernet/google/gve/gve_adminq.h