浏览代码

i40e: return the number of enabled queues for ETHTOOL_GRXRINGS

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>
Helin Zhang 9 年之前
父节点
当前提交
3e3aa21fe9
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/net/ethernet/intel/i40e/i40e_ethtool.c

+ 1 - 1
drivers/net/ethernet/intel/i40e/i40e_ethtool.c

@@ -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: