]> git.baikalelectronics.ru Git - kernel.git/commitdiff
i40e: return the number of enabled queues for ETHTOOL_GRXRINGS
authorHelin Zhang <helin.zhang@intel.com>
Wed, 21 Oct 2015 23:47:13 +0000 (19:47 -0400)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Wed, 25 Nov 2015 18:05:58 +0000 (10:05 -0800)
This patch fixes a problem where using ethtool rxnfc command could
let RX flow hash be set on disabled queues. This patch fixes the
problem by returning the number of enabled queues before setting
rxnfc.

Change-ID: Idbac86b0b47ddacc8deee7cd257e41de01cbe5c0
Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e_ethtool.c

index eeb1af4885b2e4a09c1b20ca5d4776ab5fcb9bdb..a89da8a220921a83433ba233f15e651bec676431 100644 (file)
@@ -2111,7 +2111,7 @@ static int i40e_get_rxnfc(struct net_device *netdev, struct ethtool_rxnfc *cmd,
 
        switch (cmd->cmd) {
        case ETHTOOL_GRXRINGS:
-               cmd->data = vsi->alloc_queue_pairs;
+               cmd->data = vsi->num_queue_pairs;
                ret = 0;
                break;
        case ETHTOOL_GRXFH: