aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/net/ethernet/amazon/ena/ena_netdev.h
diff options
context:
space:
mode:
authorDavid Arinzon <darinzon@amazon.com>2024-01-01 19:08:48 +0000
committerJakub Kicinski <kuba@kernel.org>2024-01-03 18:00:57 -0800
commit23ec97498026f57793be1f76c4e78b494911db1a (patch)
treec7eac98e331966c3b416e75b2107e2f6892754ad /drivers/net/ethernet/amazon/ena/ena_netdev.h
parentnet: ena: Put orthogonal fields in ena_tx_buffer in a union (diff)
downloadwireguard-linux-23ec97498026f57793be1f76c4e78b494911db1a.tar.xz
wireguard-linux-23ec97498026f57793be1f76c4e78b494911db1a.zip
net: ena: Introduce total_tx_size field in ena_tx_buffer struct
To avoid de-referencing skb or xdp_frame when we poll for TX completion (where they might not be in the cache), save the total TX packet size in the ena_tx_buffer object representing the packet. Also the 'print_once' field's type was changed from u32 to u8 to allow adding the 'total_tx_size' without changing the total size of the struct. Signed-off-by: Shay Agroskin <shayagr@amazon.com> Signed-off-by: David Arinzon <darinzon@amazon.com> Link: https://lore.kernel.org/r/20240101190855.18739-5-darinzon@amazon.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/amazon/ena/ena_netdev.h')
-rw-r--r--drivers/net/ethernet/amazon/ena/ena_netdev.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.h b/drivers/net/ethernet/amazon/ena/ena_netdev.h
index 78a4dee5a3c6..d3fc03f2ff47 100644
--- a/drivers/net/ethernet/amazon/ena/ena_netdev.h
+++ b/drivers/net/ethernet/amazon/ena/ena_netdev.h
@@ -145,12 +145,14 @@ struct ena_tx_buffer {
/* num of buffers used by this skb */
u32 num_of_bufs;
+ /* Total size of all buffers in bytes */
+ u32 total_tx_size;
/* Indicate if bufs[0] map the linear data of the skb. */
u8 map_linear_data;
/* Used for detect missing tx packets to limit the number of prints */
- u32 print_once;
+ u8 print_once;
/* Save the last jiffies to detect missing tx packets
*
* sets to non zero value on ena_start_xmit and set to zero on