devlink: fix port new reply cmd type
Subsystems (3)
Jiri Pirko
maintainerPATCH 1/1 devlink: fix port new reply cmd type
From: Jiri Pirko <[email protected]>
Due to a c&p error, port new reply fills-up cmd with wrong value, any other existing port command replies and notifications.
Fix it by filling cmd with value DEVLINK_CMD_PORT_NEW.
Skimmed through devlink userspace implementations, none of them cares about this cmd value.
--- net/devlink/port.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/devlink/port.c +1 -1
@@ -889,7 +889,7 @@ int devlink_nl_port_new_doit(struct sk_buff *skb, struct genl_info *info) err = -ENOMEM ; goto err_out_port_del; } - err =devlink_nl_port_fill (msg, devlink_port,DEVLINK_CMD_NEW , + err =devlink_nl_port_fill (msg, devlink_port,DEVLINK_CMD_PORT_NEW , info->snd_portid, info->snd_seq,0 ,NULL );if (WARN_ON_ONCE (err)) goto err_out_msg_free;
Signature · 1 line
2.44.0
Quoted 11 lines
From: Jiri Pirko <[email protected]>
Sent: Monday, March 18, 2024 2:49 PM
To: [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; Parav Pandit <[email protected]>From: Jiri Pirko <[email protected]>
Due to a c&p error, port new reply fills-up cmd with wrong value, any other existing port command replies and notifications.
I didn't understand 'c&p' error. Did you mean command and port?
Quoted 29 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.
Reported-by Chenyuan Yang <[email protected]>Fixes cd76dcd68d96 ("devlink: Support add and delete devlink port")Signed-off-by Jiri Pirko <[email protected]>--- net/devlink/port.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)net/devlink/port.c index renamed from net/devlink/port.c +0
-0
4b2d46ccfe48..118d130d2afd100644net/devlink/port.c +1
-1@@ -889,7 +889,7 @@ int devlink_nl_port_new_doit(struct sk_buff *skb, struct genl_info *info) err = -ENOMEM ; goto err_out_port_del; } - err =devlink_nl_port_fill (msg, devlink_port,DEVLINK_CMD_NEW , + err =devlink_nl_port_fill (msg, devlink_port,DEVLINK_CMD_PORT_NEW , info->snd_portid, info->snd_seq,0 ,NULL );net/devlink/port.c +0
-1if (WARN_ON_ONCE (err)) goto err_out_msg_free; --
Quoted 1 line
2.44.0
Subject should start with upper case..
Thanks,
Jiri Pirko
maintainerQuoted 6 lines · Mon, Mar 18, 2024 at 02:57:21PM CET, [email protected] wrote:
Quoted 6 lines
From: Jiri Pirko <[email protected]>
Sent: Monday, March 18, 2024 2:49 PM
To: [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; Parav Pandit <[email protected]>
Quoted 6 lines
Quoted 5 lines
From: Jiri Pirko <[email protected]>
Due to a c&p error, port new reply fills-up cmd with wrong value, any other existing port command replies and notifications.
I didn't understand 'c&p' error. Did you mean command and port?
copy&paste :)
Quoted 25 lines
Quoted 25 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.
Reported-by Chenyuan Yang <[email protected]>Fixes cd76dcd68d96 ("devlink: Support add and delete devlink port")Signed-off-by Jiri Pirko <[email protected]>--- net/devlink/port.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)net/devlink/port.c index renamed from net/devlink/port.c +0
-0
4b2d46ccfe48..118d130d2afd100644net/devlink/port.c +1
-1@@ -889,7 +889,7 @@ int devlink_nl_port_new_doit(struct sk_buff *skb, struct genl_info *info) err = -ENOMEM ; goto err_out_port_del; } - err = devlink_nl_port_fill(msg, devlink_port, DEVLINK_CMD_NEW, + err = devlink_nl_port_fill(msg, devlink_port,
Quoted 8 lines
Quoted 6 lines
net/devlink/port.c +0
-0DEVLINK_CMD_PORT_NEW , info->snd_portid, info->snd_seq, 0, NULL);net/devlink/port.c +0
-1if (WARN_ON_ONCE (err)) goto err_out_msg_free; --2.44.0
Subject should start with upper case..
I don't see why.
Quoted 4 lines
Thanks,
Reviewed-by Parav Pandit <[email protected]>
Quoted 8 lines · Jiri Pirko
From: Jiri Pirko <[email protected]>
Due to a c&p error, port new reply fills-up cmd with wrong value, any other existing port command replies and notifications.
Fix it by filling cmd with value
DEVLINK_CMD_PORT_NEW.
Quoted 7 lines
Skimmed through devlink userspace implementations, none of them cares about this cmd value.
Reported-by Chenyuan Yang <[email protected]>Fixes cd76dcd68d96 ("devlink: Support add and delete devlink port")Signed-off-by Jiri Pirko <[email protected]>
LGTM,
Quoted 21 lines
--- net/devlink/port.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)net/devlink/port.c +1
-2@@ -889,7 +889,7 @@ int devlink_nl_port_new_doit(struct sk_buff *skb, struct genl_info *info) err = -ENOMEM ; goto err_out_port_del; } - err =devlink_nl_port_fill (msg, devlink_port,DEVLINK_CMD_NEW , + err =devlink_nl_port_fill (msg, devlink_port,DEVLINK_CMD_PORT_NEW , info->snd_portid, info->snd_seq,0 ,NULL );if (WARN_ON_ONCE (err)) goto err_out_msg_free; --2.44.0
Signature · 2 lines
Regards, Kalesh A P
This patch was applied to netdev/net.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <[email protected]>:
Quoted 8 lines · On Mon, 18 Mar 2024 10:19:08 +0100 you wrote:
From: Jiri Pirko <[email protected]>
Due to a c&p error, port new reply fills-up cmd with wrong value, any other existing port command replies and notifications.
Fix it by filling cmd with value
DEVLINK_CMD_PORT_NEW.[...]
Here is the summary with links:
- [net] devlink: fix port new reply cmd type
https://git.kernel.org/netdev/net/c/78a2f5e6c15d
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html