Skip to contentSkip to conversation

devlink: fix port new reply cmd type

PATCH Applied Jiri Pirko 4 participants 5 messages Mar 18, 2024 – Mar 20, 2024

Subsystems (3)
lore
Share & tools
lore

Jiri Pirko

author maintainer
#0 lore raw

PATCH 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.

Fixes cd76dcd68d96 ("devlink: Support add and delete devlink port")
---
 net/devlink/port.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/devlink/port.c +1 -1
index 4b2d46ccfe48..118d130d2afd 100644
@@ -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
Reviewed-by on v1 1/1
#1 lore raw
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.

Fixes cd76dcd68d96 ("devlink: Support add and delete devlink port")
---
 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..118d130d2afd 100644

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);
net/devlink/port.c +0 -1
 	if (WARN_ON_ONCE(err))
 		goto err_out_msg_free;
--
Quoted 1 line

2.44.0

Subject should start with upper case..

Thanks,

author maintainer
#2 lore raw
Quoted 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.

Fixes cd76dcd68d96 ("devlink: Support add and delete devlink port")
---
 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..118d130d2afd 100644

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,
Quoted 8 lines
Quoted 6 lines
net/devlink/port.c +0 -0
 DEVLINK_CMD_PORT_NEW,
 				   info->snd_portid, info->snd_seq, 0, NULL);
net/devlink/port.c +0 -1
 	if (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 on v1 1/1
#3 lore raw
In reply to Jiri Pirko
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.

Fixes cd76dcd68d96 ("devlink: Support add and delete devlink port")

LGTM,

Quoted 21 lines
---
 net/devlink/port.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/devlink/port.c +1 -2
index 4b2d46ccfe48..118d130d2afd 100644
@@ -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
#4 lore raw
In reply to Jiri Pirko
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