devlink: fix port dump cmd type
Subsystems (3)
Jiri Pirko
maintainerPATCH 1/1 devlink: fix port dump cmd type
From: Jiri Pirko <[email protected]>
Unlike other commands, due to a c&p error, port dump fills-up cmd with wrong value, different from port-get request cmd, port-get doit reply and port notification.
Fix it by filling cmd with value DEVLINK_CMD_PORT_NEW.
Skimmed through devlink userspace implementations, none of them cares about this cmd value. Only ynl, for which, this is actually a fix, as it expects doit and dumpit ops rsp_value to be the same.
Omit the fixes tag, even thought this is fix, better to target this for next release.
--- net/devlink/port.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/devlink/port.c +1 -1
@@ -583,7 +583,7 @@ devlink_nl_port_get_dump_one(struct sk_buff *msg, struct devlink *devlink,xa_for_each_start (&devlink->ports, port_index, devlink_port, state->idx) { err =devlink_nl_port_fill (msg, devlink_port, -DEVLINK_CMD_NEW , +DEVLINK_CMD_PORT_NEW ,NETLINK_CB (cb->skb).portid, cb->nlh->nlmsg_seq, flags, cb->extack);
Signature · 1 line
2.43.2
Quoted 11 lines · Jiri Pirko
From: Jiri Pirko <[email protected]>
Unlike other commands, due to a c&p error, port dump fills-up cmd with wrong value, different from port-get request cmd, port-get doit reply and port notification.
Fix it by filling cmd with value
DEVLINK_CMD_PORT_NEW.Skimmed through devlink userspace implementations, none of them cares about this cmd value. Only ynl, for which, this is actually a fix, as it expects doit and dumpit ops
rsp_valueto be the same.
I guess that in theory unknown implementations could exist. But, ok :)
Quoted 5 lines
Omit the fixes tag, even thought this is fix, better to target this for next release.
Signed-off-by Jiri Pirko <[email protected]>
Jakub Kicinski
maintainerQuoted 8 lines · On Mon, 19 Feb 2024 15:13:43 +0000 Simon Horman wrote:
Quoted 5 lines
Fix it by filling cmd with value
DEVLINK_CMD_PORT_NEW.Skimmed through devlink userspace implementations, none of them cares about this cmd value. Only ynl, for which, this is actually a fix, as it expects doit and dumpit ops
rsp_valueto be the same.I guess that in theory unknown implementations could exist. But, ok :)
I'd also prefer Fixes tag + net. YNL is user space, even if current YNL specs don't trigger it (I'm speculating that that's why you feel it's not a fix) someone may end up using YNL + YAML from 6.9 and expect it to work on 6.6 LTS.
Signature · 1 line
pw-bot: cr
Jiri Pirko
maintainerQuoted 7 lines · Mon, Feb 19, 2024 at 09:20:38PM CET, [email protected] wrote:
Quoted 6 lines · On Mon, 19 Feb 2024 15:13:43 +0000 Simon Horman wrote:
Quoted 5 lines
Fix it by filling cmd with value
DEVLINK_CMD_PORT_NEW.Skimmed through devlink userspace implementations, none of them cares about this cmd value. Only ynl, for which, this is actually a fix, as it expects doit and dumpit ops
rsp_valueto be the same.
Quoted 7 lines
Quoted 2 lines
I guess that in theory unknown implementations could exist. But, ok :)
I'd also prefer Fixes tag + net. YNL is user space, even if current YNL specs don't trigger it (I'm speculating that that's why you feel it's not a fix) someone may end up using YNL + YAML from 6.9 and expect it to work on 6.6 LTS.
As you wish.
Quoted 2 lines
Signature · 1 line
pw-bot: cr