net: ena: Make queue stats code cleaner by removing the if block

Also shorten comment related to it.

Signed-off-by: Arthur Kiyanovski <akiyano@amazon.com>
Signed-off-by: David Arinzon <darinzon@amazon.com>
Link: https://lore.kernel.org/r/20240101190855.18739-11-darinzon@amazon.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
David Arinzon 2024-01-01 19:08:54 +00:00 committed by Jakub Kicinski
parent ea5c460023
commit 4f28e789be

View File

@ -263,17 +263,14 @@ static void ena_queue_strings(struct ena_adapter *adapter, u8 **data)
ena_stats->name);
}
if (!is_xdp) {
/* RX stats, in XDP there isn't a RX queue
* counterpart
*/
for (j = 0; j < ENA_STATS_ARRAY_RX; j++) {
ena_stats = &ena_stats_rx_strings[j];
/* In XDP there isn't an RX queue counterpart */
if (is_xdp)
continue;
ethtool_sprintf(data,
"queue_%u_rx_%s", i,
ena_stats->name);
}
for (j = 0; j < ENA_STATS_ARRAY_RX; j++) {
ena_stats = &ena_stats_rx_strings[j];
ethtool_sprintf(data, "queue_%u_rx_%s", i, ena_stats->name);
}
}
}