netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch net] devlink: fix port new reply cmd type
@ 2024-03-18  9:19 Jiri Pirko
  2024-03-18 13:57 ` Parav Pandit
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Jiri Pirko @ 2024-03-18  9:19 UTC (permalink / raw)
  To: netdev; +Cc: kuba, pabeni, davem, edumazet, parav

From: Jiri Pirko <jiri@nvidia.com>

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.

Reported-by: Chenyuan Yang <chenyuan0y@gmail.com>
Closes: https://lore.kernel.org/all/ZfZcDxGV3tSy4qsV@cy-server/
Fixes: cd76dcd68d96 ("devlink: Support add and delete devlink port")
Signed-off-by: Jiri Pirko <jiri@nvidia.com>
---
 net/devlink/port.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/devlink/port.c b/net/devlink/port.c
index 4b2d46ccfe48..118d130d2afd 100644
--- a/net/devlink/port.c
+++ b/net/devlink/port.c
@@ -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


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* RE: [patch net] devlink: fix port new reply cmd type
  2024-03-18  9:19 [patch net] devlink: fix port new reply cmd type Jiri Pirko
@ 2024-03-18 13:57 ` Parav Pandit
  2024-03-18 14:21   ` Jiri Pirko
  2024-03-18 14:24 ` Kalesh Anakkur Purayil
  2024-03-20  3:10 ` patchwork-bot+netdevbpf
  2 siblings, 1 reply; 5+ messages in thread
From: Parav Pandit @ 2024-03-18 13:57 UTC (permalink / raw)
  To: Jiri Pirko, netdev; +Cc: kuba, pabeni, davem, edumazet

> From: Jiri Pirko <jiri@resnulli.us>
> Sent: Monday, March 18, 2024 2:49 PM
> To: netdev@vger.kernel.org
> Cc: kuba@kernel.org; pabeni@redhat.com; davem@davemloft.net;
> edumazet@google.com; Parav Pandit <parav@nvidia.com>
> 
> From: Jiri Pirko <jiri@nvidia.com>
> 
> 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?

> 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 <chenyuan0y@gmail.com>
> Closes: https://lore.kernel.org/all/ZfZcDxGV3tSy4qsV@cy-server/
> Fixes: cd76dcd68d96 ("devlink: Support add and delete devlink port")
> Signed-off-by: Jiri Pirko <jiri@nvidia.com>
> ---
>  net/devlink/port.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/net/devlink/port.c b/net/devlink/port.c index
> 4b2d46ccfe48..118d130d2afd 100644
> --- a/net/devlink/port.c
> +++ b/net/devlink/port.c
> @@ -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

Subject should start with upper case.. 

Thanks,
Reviewed-by: Parav Pandit <parav@nvidia.com>


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [patch net] devlink: fix port new reply cmd type
  2024-03-18 13:57 ` Parav Pandit
@ 2024-03-18 14:21   ` Jiri Pirko
  0 siblings, 0 replies; 5+ messages in thread
From: Jiri Pirko @ 2024-03-18 14:21 UTC (permalink / raw)
  To: Parav Pandit; +Cc: netdev, kuba, pabeni, davem, edumazet

Mon, Mar 18, 2024 at 02:57:21PM CET, parav@nvidia.com wrote:
>> From: Jiri Pirko <jiri@resnulli.us>
>> Sent: Monday, March 18, 2024 2:49 PM
>> To: netdev@vger.kernel.org
>> Cc: kuba@kernel.org; pabeni@redhat.com; davem@davemloft.net;
>> edumazet@google.com; Parav Pandit <parav@nvidia.com>
>> 
>> From: Jiri Pirko <jiri@nvidia.com>
>> 
>> 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 :)


>
>> 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 <chenyuan0y@gmail.com>
>> Closes: https://lore.kernel.org/all/ZfZcDxGV3tSy4qsV@cy-server/
>> Fixes: cd76dcd68d96 ("devlink: Support add and delete devlink port")
>> Signed-off-by: Jiri Pirko <jiri@nvidia.com>
>> ---
>>  net/devlink/port.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>> diff --git a/net/devlink/port.c b/net/devlink/port.c index
>> 4b2d46ccfe48..118d130d2afd 100644
>> --- a/net/devlink/port.c
>> +++ b/net/devlink/port.c
>> @@ -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
>
>Subject should start with upper case.. 

I don't see why.


>
>Thanks,
>Reviewed-by: Parav Pandit <parav@nvidia.com>
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [patch net] devlink: fix port new reply cmd type
  2024-03-18  9:19 [patch net] devlink: fix port new reply cmd type Jiri Pirko
  2024-03-18 13:57 ` Parav Pandit
@ 2024-03-18 14:24 ` Kalesh Anakkur Purayil
  2024-03-20  3:10 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 5+ messages in thread
From: Kalesh Anakkur Purayil @ 2024-03-18 14:24 UTC (permalink / raw)
  To: Jiri Pirko; +Cc: netdev, kuba, pabeni, davem, edumazet, parav

[-- Attachment #1: Type: text/plain, Size: 1516 bytes --]

On Mon, Mar 18, 2024 at 2:49 PM Jiri Pirko <jiri@resnulli.us> wrote:
>
> From: Jiri Pirko <jiri@nvidia.com>
>
> 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.
>
> Reported-by: Chenyuan Yang <chenyuan0y@gmail.com>
> Closes: https://lore.kernel.org/all/ZfZcDxGV3tSy4qsV@cy-server/
> Fixes: cd76dcd68d96 ("devlink: Support add and delete devlink port")
> Signed-off-by: Jiri Pirko <jiri@nvidia.com>

LGTM,
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
> ---
>  net/devlink/port.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/devlink/port.c b/net/devlink/port.c
> index 4b2d46ccfe48..118d130d2afd 100644
> --- a/net/devlink/port.c
> +++ b/net/devlink/port.c
> @@ -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
>
>


-- 
Regards,
Kalesh A P

[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4239 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [patch net] devlink: fix port new reply cmd type
  2024-03-18  9:19 [patch net] devlink: fix port new reply cmd type Jiri Pirko
  2024-03-18 13:57 ` Parav Pandit
  2024-03-18 14:24 ` Kalesh Anakkur Purayil
@ 2024-03-20  3:10 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 5+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-03-20  3:10 UTC (permalink / raw)
  To: Jiri Pirko; +Cc: netdev, kuba, pabeni, davem, edumazet, parav

Hello:

This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Mon, 18 Mar 2024 10:19:08 +0100 you wrote:
> From: Jiri Pirko <jiri@nvidia.com>
> 
> 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!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-03-20  3:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-18  9:19 [patch net] devlink: fix port new reply cmd type Jiri Pirko
2024-03-18 13:57 ` Parav Pandit
2024-03-18 14:21   ` Jiri Pirko
2024-03-18 14:24 ` Kalesh Anakkur Purayil
2024-03-20  3:10 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).