Commit 579d059b authored by Matan Barak's avatar Matan Barak Committed by David S. Miller

net/mlx4_core: Add explicit error message when rule doesn't meet configuration

When a given flow steering rule is invalid in respect to the current
steering configuration, print the correct error message to the system log.
Signed-off-by: default avatarMatan Barak <matanb@mellanox.com>
Signed-off-by: default avatarOr Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d57febe1
...@@ -999,12 +999,27 @@ int mlx4_flow_attach(struct mlx4_dev *dev, ...@@ -999,12 +999,27 @@ int mlx4_flow_attach(struct mlx4_dev *dev,
} }
ret = mlx4_QP_FLOW_STEERING_ATTACH(dev, mailbox, size >> 2, reg_id); ret = mlx4_QP_FLOW_STEERING_ATTACH(dev, mailbox, size >> 2, reg_id);
if (ret == -ENOMEM) if (ret == -ENOMEM) {
mlx4_err_rule(dev, mlx4_err_rule(dev,
"mcg table is full. Fail to register network rule\n", "mcg table is full. Fail to register network rule\n",
rule); rule);
else if (ret) } else if (ret) {
mlx4_err_rule(dev, "Fail to register network rule\n", rule); if (ret == -ENXIO) {
if (dev->caps.steering_mode != MLX4_STEERING_MODE_DEVICE_MANAGED)
mlx4_err_rule(dev,
"DMFS is not enabled, "
"failed to register network rule.\n",
rule);
else
mlx4_err_rule(dev,
"Rule exceeds the dmfs_high_rate_mode limitations, "
"failed to register network rule.\n",
rule);
} else {
mlx4_err_rule(dev, "Fail to register network rule.\n", rule);
}
}
mlx4_free_cmd_mailbox(dev, mailbox); mlx4_free_cmd_mailbox(dev, mailbox);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment