OpenCloudOS-Kernel/net/devlink
Jiri Pirko 30d8d56aee 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: bfcd3a4661 ("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>
2024-03-01 13:35:09 +01:00
..
Makefile devlink: move devlink_notify_register/unregister() to dev.c 2023-08-28 08:02:24 -07:00
core.c devlink: fix possible use-after-free and memory leaks in devlink_init() 2024-03-01 13:35:07 +01:00
dev.c devlink: move devlink_notify_register/unregister() to dev.c 2023-08-28 08:02:24 -07:00
devl_internal.h devlink: move devlink_notify_register/unregister() to dev.c 2023-08-28 08:02:24 -07:00
dpipe.c devlink: push dpipe related code into separate file 2023-08-28 08:02:22 -07:00
health.c devlink: Hold devlink lock on health reporter dump get 2023-10-06 15:56:46 -07:00
linecard.c devlink: push linecard related code into separate file 2023-08-28 08:02:23 -07:00
netlink.c devlink: move small_ops definition into netlink.c 2023-08-28 08:02:23 -07:00
netlink_gen.c netlink: specs: devlink: extend health reporter dump attributes by port index 2023-08-14 11:47:25 -07:00
netlink_gen.h netlink: specs: devlink: add commands that do per-instance dump 2023-08-14 11:47:25 -07:00
param.c devlink: push param related code into separate file 2023-08-28 08:02:22 -07:00
port.c devlink: fix port dump cmd type 2024-03-01 13:35:09 +01:00
rate.c devlink: push rate related code into separate file 2023-08-28 08:02:23 -07:00
region.c devlink: push region related code into separate file 2023-08-28 08:02:23 -07:00
resource.c devlink: push resource related code into separate file 2023-08-28 08:02:22 -07:00
sb.c devlink: push shared buffer related code into separate file 2023-08-28 08:02:22 -07:00
trap.c devlink: push trap related code into separate file 2023-08-28 08:02:23 -07:00