mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-19 06:17:08 +07:00
net/mlx5: Disallow RoCE on multi port slave device
[ Upstream commit c70f8597fcc1399ef6d5b5ce648a31d887d5dba2 ]
In dual port mode, setting roce enabled/disable for the slave device
have no effect. e.g.: the slave device roce status remain unchanged.
Therefore disable it and add an error message.
Enable or disable roce of the master device affect both master and slave
devices.
Fixes: cc9defcbb8
("net/mlx5: Handle "enable_roce" devlink param")
Signed-off-by: Shay Drory <shayd@nvidia.com>
Reviewed-by: Moshe Shemesh <moshe@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
efb1aa6f11
commit
8dafb484fe
@ -282,6 +282,10 @@ static int mlx5_devlink_enable_roce_validate(struct devlink *devlink, u32 id,
|
||||
NL_SET_ERR_MSG_MOD(extack, "Device doesn't support RoCE");
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
if (mlx5_core_is_mp_slave(dev)) {
|
||||
NL_SET_ERR_MSG_MOD(extack, "Multi port slave device can't configure RoCE");
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user