]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
gve: refactor DQO TX methods to be more generic for XDP
authorJoshua Washington <joshwash@google.com>
Wed, 18 Jun 2025 20:56:12 +0000 (20:56 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sat, 21 Jun 2025 13:26:24 +0000 (14:26 +0100)
commitcb711b3d197aaf7c86d8f70163cd09c5fe768796
tree26f0df262ac0112464c10094f79ac19cfa6cd03f
parentd05ebf7cc3c5ee78ff8567a22148ab0d82a5d1c4
gve: refactor DQO TX methods to be more generic for XDP

This patch performs various minor DQO TX datapath refactors in
preparation for adding XDP_TX and XDP_REDIRECT support. The following
refactors are performed:

1) gve_tx_fill_pkt_desc_dqo() relies on a SKB pointer to
   get whether checksum offloading should be enabled. This won't work
   for the XDP case, which does not have a SKB. This patch updates the
   method to use a boolean representing whether checksum offloading
   should be enabled directly.

2) gve_maybe_stop_dqo() contains some synchronization between the true
   TX head and the cached value, a synchronization which is common for
   XDP queues and normal netdev queues. However, that method is reserved
   for netdev TX queues. To avoid duplicate code, this logic is factored
   out into a new method, gve_has_tx_slots_available().

3) gve_tx_update_tail() is added to update the TX tail, a functionality
   that will be common between normal TX and XDP TX codepaths.

Reviewed-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: Joshua Washington <joshwash@google.com>
Signed-off-by: Praveen Kaligineedi <pkaligineedi@google.com>
Signed-off-by: Harshitha Ramamurthy <hramamurthy@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/google/gve/gve_tx_dqo.c