mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-28 21:33:52 +00:00
nfp: devlink: add extended ack report messages
Add descriptive error messages to common devlink failures to be more user friendly. Signed-off-by: Ryno Swart <ryno.swart@corigine.com> Signed-off-by: Louis Peens <louis.peens@corigine.com> Link: https://lore.kernel.org/r/20231206151209.20296-3-louis.peens@corigine.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
b0318e2854
commit
2f076ea866
1 changed files with 6 additions and 2 deletions
|
@ -75,8 +75,10 @@ nfp_devlink_port_split(struct devlink *devlink, struct devlink_port *port,
|
|||
if (ret)
|
||||
return ret;
|
||||
|
||||
if (eth_port.port_lanes % count)
|
||||
if (eth_port.port_lanes % count) {
|
||||
NL_SET_ERR_MSG_MOD(extack, "invalid count");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/* Special case the 100G CXP -> 2x40G split */
|
||||
lanes = eth_port.port_lanes / count;
|
||||
|
@ -101,8 +103,10 @@ nfp_devlink_port_unsplit(struct devlink *devlink, struct devlink_port *port,
|
|||
if (ret)
|
||||
return ret;
|
||||
|
||||
if (!eth_port.is_split)
|
||||
if (!eth_port.is_split) {
|
||||
NL_SET_ERR_MSG_MOD(extack, "port is not split");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/* Special case the 100G CXP -> 2x40G unsplit */
|
||||
lanes = eth_port.port_lanes;
|
||||
|
|
Loading…
Reference in a new issue