ionic: enable rxhash only with multiple queues
authorShannon Nelson <snelson@pensando.io>
Tue, 27 Jul 2021 17:43:33 +0000 (10:43 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 27 Jul 2021 19:15:22 +0000 (20:15 +0100)
If there's only one queue, there is no need to enable
the rxhashing.

Signed-off-by: Shannon Nelson <snelson@pensando.io>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/pensando/ionic/ionic_lif.c

index 4a36ebb..f21f80c 100644 (file)
@@ -1607,7 +1607,6 @@ static int ionic_init_nic_features(struct ionic_lif *lif)
        features = NETIF_F_HW_VLAN_CTAG_TX |
                   NETIF_F_HW_VLAN_CTAG_RX |
                   NETIF_F_HW_VLAN_CTAG_FILTER |
-                  NETIF_F_RXHASH |
                   NETIF_F_SG |
                   NETIF_F_HW_CSUM |
                   NETIF_F_RXCSUM |
@@ -1615,6 +1614,9 @@ static int ionic_init_nic_features(struct ionic_lif *lif)
                   NETIF_F_TSO6 |
                   NETIF_F_TSO_ECN;
 
+       if (lif->nxqs > 1)
+               features |= NETIF_F_RXHASH;
+
        err = ionic_set_nic_features(lif, features);
        if (err)
                return err;