Praveen Kaligineedi fd8e40321a gve: Add AF_XDP zero-copy support for GQI-QPL format
Adding AF_XDP zero-copy support.

Note: Although these changes support AF_XDP socket in zero-copy
mode, there is still a copy happening within the driver between
XSK buffer pool and QPL bounce buffers in GQI-QPL format.
In GQI-QPL queue format, the driver needs to allocate a fixed size
memory, the size specified by vNIC device, for RX/TX and register this
memory as a bounce buffer with the vNIC device when a queue is
created. The number of pages in the bounce buffer is limited and the
pages need to be made available to the vNIC by copying the RX data out
to prevent head-of-line blocking. Therefore, we cannot pass the XSK
buffer pool to the vNIC.

The number of copies on RX path from the bounce buffer to XSK buffer is 2
for AF_XDP copy mode (bounce buffer -> allocated page frag -> XSK buffer)
and 1 for AF_XDP zero-copy mode (bounce buffer -> XSK buffer).

This patch contains the following changes:
1) Enable and disable XSK buffer pool
2) Copy XDP packets from QPL bounce buffers to XSK buffer on rx
3) Copy XDP packets from XSK buffer to QPL bounce buffers and
   ring the doorbell as part of XDP TX napi poll
4) ndo_xsk_wakeup callback support

Signed-off-by: Praveen Kaligineedi <pkaligineedi@google.com>
Reviewed-by: Jeroen de Borst <jeroendb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2023-03-17 08:29:21 +00:00
..
2023-03-03 10:36:01 -08:00
2023-03-03 10:21:39 -08:00
2023-02-27 10:04:49 -08:00
2023-02-27 10:04:49 -08:00
2023-02-25 09:19:23 -08:00
2023-02-25 09:19:23 -08:00
2023-02-24 17:18:54 -08:00
2023-02-24 12:58:55 -08:00
2023-02-27 10:04:49 -08:00
2023-02-24 12:58:55 -08:00
2023-02-24 12:58:55 -08:00
2023-03-02 15:08:54 -08:00
2023-03-09 10:17:23 -08:00
2023-02-24 12:58:55 -08:00
2023-02-24 12:58:55 -08:00
2023-02-23 15:03:05 -08:00
2023-02-24 12:58:55 -08:00
2023-03-03 21:00:54 +01:00
2023-02-28 16:05:01 -08:00
2023-02-21 12:13:58 -08:00
2023-02-24 15:11:03 -08:00
2023-02-27 10:04:49 -08:00
2023-02-20 15:49:56 -08:00
2023-02-27 10:04:49 -08:00
2023-02-24 12:58:55 -08:00
2023-02-25 11:30:21 -08:00
2023-02-23 15:09:31 -08:00
2023-02-25 11:00:06 -08:00
2023-02-27 10:04:49 -08:00
2023-02-27 10:04:49 -08:00
2023-02-27 09:47:26 -08:00
2023-02-27 10:04:49 -08:00
2023-02-27 10:04:49 -08:00
2023-02-25 11:48:02 -08:00
2023-03-03 10:21:39 -08:00
2023-02-24 13:40:13 -08:00
2023-02-24 12:58:55 -08:00
2023-02-27 10:04:49 -08:00
2023-02-27 10:04:49 -08:00
2023-02-20 12:26:35 +01:00
2023-03-02 09:21:25 -08:00
2023-02-27 10:04:49 -08:00
2023-02-26 12:10:28 -08:00
2023-03-03 09:15:50 -08:00
2023-03-15 08:18:35 +00:00
2023-03-01 09:44:22 -08:00
2023-02-27 10:04:49 -08:00
2023-02-24 17:29:52 -08:00
2023-03-02 09:25:38 -08:00
2023-02-26 11:47:26 -08:00
2023-02-24 12:58:55 -08:00
2023-03-03 14:41:50 -08:00
2023-02-24 17:22:11 -08:00
2023-02-25 11:48:02 -08:00
2023-02-25 11:52:57 -08:00
2023-02-25 11:48:02 -08:00
2023-02-25 11:48:02 -08:00
2023-02-24 12:58:55 -08:00
2023-03-02 11:12:01 -08:00
2023-02-24 12:58:55 -08:00
2023-02-26 11:53:25 -08:00