gve: introduce config-based allocation for XDP
authorJoshua Washington <joshwash@google.com>
Fri, 21 Mar 2025 00:29:06 +0000 (00:29 +0000)
committerJakub Kicinski <kuba@kernel.org>
Tue, 25 Mar 2025 20:51:14 +0000 (13:51 -0700)
commit542a58f1b090cdcea951b7c9c48c3ba57d1e35b1
tree0fc71b45ef4fd38dccaa40e5eebbb4557d982522
parentc2b900958535a6b958f86245e9afca2df59329bd
gve: introduce config-based allocation for XDP

An earlier patch series[1] introduced RX/TX ring allocation configuration
structs which contained metadata used to allocate and configure new RX
and TX rings. This led to a much cleaner and safer allocation pattern
wherein queue resources were not deallocated until new queue resources
were successfully allocated.

Migrate the XDP allocation path to use the same pattern to allow for the
existence of a single allocation path instead of relying on XDP-specific
allocation methods. These extra allocation methods result in the
duplication of many existing behaviors while being prone to error when
configuration changes unrelated to XDP occur.

Link: https://lore.kernel.org/netdev/20240122182632.1102721-1-shailend@google.com/
Reviewed-by: Praveen Kaligineedi <pkaligineedi@google.com>
Reviewed-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: Joshua Washington <joshwash@google.com>
Signed-off-by: Harshitha Ramamurthy <hramamurthy@google.com>
Link: https://patch.msgid.link/20250321002910.1343422-3-hramamurthy@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/google/gve/gve.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_tx.c
drivers/net/ethernet/google/gve/gve_tx_dqo.c