Skip to contentSkip to conversation

mlx4: VF is not allowed to perform dump stats

PATCH In review Yevgeny Petrilin 1 participant 1 message Jan 18, 2012

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 2/6 mlx4: VF is not allowed to perform dump stats

From: Eugenia Emantayev <[email protected]>

In multifunction mode - DUMP_STATS command is not executed for VFs.

---
 drivers/net/ethernet/mellanox/mlx4/port.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/net/ethernet/mellanox/mlx4/port.c +2 -0
index 88b52e5..1a551d6 100644
@@ -898,6 +898,8 @@ int mlx4_DUMP_ETH_STATS_wrapper(struct mlx4_dev *dev, int slave,
 				struct mlx4_cmd_mailbox *outbox,
 				struct mlx4_cmd_info *cmd)
 {
+	if (slave != dev->caps.function)
+		return 0;
 	return mlx4_common_dump_eth_stats(dev, slave,
 					  vhcr->in_modifier, outbox);
 }
Signature · 1 line
1.5.4.3