tsnep: Fix ethtool channels
authorGerhard Engleder <gerhard@engleder-embedded.com>
Fri, 15 Sep 2023 21:01:25 +0000 (23:01 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 18 Sep 2023 09:42:36 +0000 (10:42 +0100)
According to the NAPI documentation networking/napi.rst, for the ethtool
API a channel is a IRQ/NAPI which services queues of a given type.

tsnep uses a single IRQ/NAPI instance for every TX/RX queue pair.
Therefore, combined channels shall be returned instead of separate tx/rx
channels.

Signed-off-by: Gerhard Engleder <gerhard@engleder-embedded.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/engleder/tsnep_ethtool.c

index 716815dad7d2190c29a44603e1ef342d985c1d2f..65ec1abc944211471f5eef3d564718c2c6b566fd 100644 (file)
@@ -300,10 +300,8 @@ static void tsnep_ethtool_get_channels(struct net_device *netdev,
 {
        struct tsnep_adapter *adapter = netdev_priv(netdev);
 
-       ch->max_rx = adapter->num_rx_queues;
-       ch->max_tx = adapter->num_tx_queues;
-       ch->rx_count = adapter->num_rx_queues;
-       ch->tx_count = adapter->num_tx_queues;
+       ch->max_combined = adapter->num_queues;
+       ch->combined_count = adapter->num_queues;
 }
 
 static int tsnep_ethtool_get_ts_info(struct net_device *netdev,