net: ena: Use tx_ring instead of xdp_ring for XDP channel TX
authorDavid Arinzon <darinzon@amazon.com>
Mon, 1 Jan 2024 19:08:49 +0000 (19:08 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Apr 2024 09:19:32 +0000 (11:19 +0200)
commit354627f9267949cdb8049d0ff0b539207ef21836
tree1de86d09847cf8e6acdb5bcc8234ac098aa60263
parentbc0ad6857c868401b60096a892c28c045c3f21ab
net: ena: Use tx_ring instead of xdp_ring for XDP channel TX

[ Upstream commit 911a8c960110b03ed519ce43ea6c9990a0ee0ceb ]

When an XDP program is loaded the existing channels in the driver split
into two halves:
- The first half of the channels contain RX and TX rings, these queues
  are used for receiving traffic and sending packets originating from
  kernel.
- The second half of the channels contain only a TX ring. These queues
  are used for sending packets that were redirected using XDP_TX
  or XDP_REDIRECT.

Referring to the queues in the second half of the channels as "xdp_ring"
can be confusing and may give the impression that ENA has the capability
to generate an additional special queue.

This patch ensures that the xdp_ring field is exclusively used to
describe the XDP TX queue that a specific RX queue needs to utilize when
forwarding packets with XDP TX and XDP REDIRECT, preserving the
integrity of the xdp_ring field in ena_ring.

Signed-off-by: Shay Agroskin <shayagr@amazon.com>
Signed-off-by: David Arinzon <darinzon@amazon.com>
Link: https://lore.kernel.org/r/20240101190855.18739-6-darinzon@amazon.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Stable-dep-of: 36a1ca01f045 ("net: ena: Set tx_info->xdpf value to NULL")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/amazon/ena/ena_netdev.c
drivers/net/ethernet/amazon/ena/ena_netdev.h
drivers/net/ethernet/amazon/ena/ena_xdp.c
drivers/net/ethernet/amazon/ena/ena_xdp.h