gve: Alloc and free QPLs with the rings
authorShailend Chand <shailend@google.com>
Wed, 1 May 2024 23:25:48 +0000 (23:25 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sun, 5 May 2024 13:35:34 +0000 (14:35 +0100)
commitee24284e2a1075966f0f2c5499c59b7d2b9bc2de
treee1a650c406567d5292c2b252d5bac40d7e855fb9
parentaf9bcf910b1f86244f39e15e701b2dc564b469a6
gve: Alloc and free QPLs with the rings

Every tx and rx ring has its own queue-page-list (QPL) that serves as
the bounce buffer. Previously we were allocating QPLs for all queues
before the queues themselves were allocated and later associating a QPL
with a queue. This is avoidable complexity: it is much more natural for
each queue to allocate and free its own QPL.

Moreover, the advent of new queue-manipulating ndo hooks make it hard to
keep things as is: we would need to transfer a QPL from an old queue to
a new queue, and that is unpleasant.

Tested-by: Mina Almasry <almasrymina@google.com>
Reviewed-by: Praveen Kaligineedi <pkaligineedi@google.com>
Reviewed-by: Harshitha Ramamurthy <hramamurthy@google.com>
Signed-off-by: Shailend Chand <shailend@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
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