gve: Implement packet continuation for RX.
authorDavid Awogbemila <awogbemila@google.com>
Sun, 24 Oct 2021 18:42:37 +0000 (11:42 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 25 Oct 2021 13:13:12 +0000 (14:13 +0100)
commit37149e9374bf7271563f7477ace9014ebc65a8af
tree05877f2c1e56b83ed4c49a87aa2487897f11ee9c
parent1344e751e91092ac0cb63b194621e59d2f364197
gve: Implement packet continuation for RX.

This enables the driver to receive RX packets spread across multiple
buffers:

For a given multi-fragment packet the "packet continuation" bit is set
on all descriptors except the last one. These descriptors' payloads are
combined into a single SKB before the SKB is handed to the
networking stack.

This change adds a "packet buffer size" notion for RX queues. The
CreateRxQueue AdminQueue command sent to the device now includes the
packet_buffer_size.

We opt for a packet_buffer_size of PAGE_SIZE / 2 to give the
driver the opportunity to flip pages where we can instead of copying.

Signed-off-by: David Awogbemila <awogbemila@google.com>
Signed-off-by: Jeroen de Borst <jeroendb@google.com>
Reviewed-by: Catherine Sullivan <csully@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/google/gve/gve.h
drivers/net/ethernet/google/gve/gve_adminq.c
drivers/net/ethernet/google/gve/gve_desc.h
drivers/net/ethernet/google/gve/gve_ethtool.c
drivers/net/ethernet/google/gve/gve_main.c
drivers/net/ethernet/google/gve/gve_rx.c
drivers/net/ethernet/google/gve/gve_rx_dqo.c
drivers/net/ethernet/google/gve/gve_utils.c
drivers/net/ethernet/google/gve/gve_utils.h