diff options
author | Jiri Pirko <jiri@nvidia.com> | 2024-02-20 10:52:45 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-03-01 15:35:09 +0300 |
commit | 30d8d56aee704326e4d5282b556c49e239ee10be (patch) | |
tree | 88a474501275112550dc2eb9bd19fb3e8bd31139 | |
parent | a702e98833420f386cff1986f1517e8cf6585e25 (diff) | |
download | linux-30d8d56aee704326e4d5282b556c49e239ee10be.tar.xz |
devlink: fix port dump cmd type
[ Upstream commit 61c43780e9444123410cd48c2483e01d2b8f75e8 ]
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.
Fixes: bfcd3a466172 ("Introduce devlink infrastructure")
Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Reviewed-by: Jakub Kicinski <kuba@kernel.org>
Link: https://lore.kernel.org/r/20240220075245.75416-1-jiri@resnulli.us
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r-- | net/devlink/port.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/devlink/port.c b/net/devlink/port.c index 91ba1ca0f355..9b5ff0fccefd 100644 --- a/net/devlink/port.c +++ b/net/devlink/port.c @@ -574,7 +574,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); |