* [patch net-next] devlink: fix port dump cmd type
@ 2024-02-16 11:31 Jiri Pirko
2024-02-19 15:13 ` Simon Horman
0 siblings, 1 reply; 4+ messages in thread
From: Jiri Pirko @ 2024-02-16 11:31 UTC (permalink / raw)
To: netdev; +Cc: kuba, pabeni, davem, edumazet
From: Jiri Pirko <jiri@nvidia.com>
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.
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 78592912f657..4b2d46ccfe48 100644
--- a/net/devlink/port.c
+++ b/net/devlink/port.c
@@ -583,7 +583,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);
--
2.43.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [patch net-next] devlink: fix port dump cmd type
2024-02-16 11:31 [patch net-next] devlink: fix port dump cmd type Jiri Pirko
@ 2024-02-19 15:13 ` Simon Horman
2024-02-19 20:20 ` Jakub Kicinski
0 siblings, 1 reply; 4+ messages in thread
From: Simon Horman @ 2024-02-19 15:13 UTC (permalink / raw)
To: Jiri Pirko; +Cc: netdev, kuba, pabeni, davem, edumazet
On Fri, Feb 16, 2024 at 12:31:47PM +0100, Jiri Pirko wrote:
> From: Jiri Pirko <jiri@nvidia.com>
>
> 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.
I guess that in theory unknown implementations could exist.
But, ok :)
>
> Omit the fixes tag, even thought this is fix, better to target this for
> next release.
>
> Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Reviewed-by: Simon Horman <horms@kernel.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch net-next] devlink: fix port dump cmd type
2024-02-19 15:13 ` Simon Horman
@ 2024-02-19 20:20 ` Jakub Kicinski
2024-02-20 7:42 ` Jiri Pirko
0 siblings, 1 reply; 4+ messages in thread
From: Jakub Kicinski @ 2024-02-19 20:20 UTC (permalink / raw)
To: Simon Horman; +Cc: Jiri Pirko, netdev, pabeni, davem, edumazet
On Mon, 19 Feb 2024 15:13:43 +0000 Simon Horman wrote:
> > 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.
>
> I guess that in theory unknown implementations could exist.
> But, ok :)
I'd also prefer Fixes tag + net. YNL is user space, even if current YNL
specs don't trigger it (I'm speculating that that's why you feel it's
not a fix) someone may end up using YNL + YAML from 6.9 and expect it
to work on 6.6 LTS.
--
pw-bot: cr
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch net-next] devlink: fix port dump cmd type
2024-02-19 20:20 ` Jakub Kicinski
@ 2024-02-20 7:42 ` Jiri Pirko
0 siblings, 0 replies; 4+ messages in thread
From: Jiri Pirko @ 2024-02-20 7:42 UTC (permalink / raw)
To: Jakub Kicinski; +Cc: Simon Horman, netdev, pabeni, davem, edumazet
Mon, Feb 19, 2024 at 09:20:38PM CET, kuba@kernel.org wrote:
>On Mon, 19 Feb 2024 15:13:43 +0000 Simon Horman wrote:
>> > 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.
>>
>> I guess that in theory unknown implementations could exist.
>> But, ok :)
>
>I'd also prefer Fixes tag + net. YNL is user space, even if current YNL
>specs don't trigger it (I'm speculating that that's why you feel it's
>not a fix) someone may end up using YNL + YAML from 6.9 and expect it
>to work on 6.6 LTS.
As you wish.
>--
>pw-bot: cr
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-02-20 7:42 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-16 11:31 [patch net-next] devlink: fix port dump cmd type Jiri Pirko
2024-02-19 15:13 ` Simon Horman
2024-02-19 20:20 ` Jakub Kicinski
2024-02-20 7:42 ` Jiri Pirko
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).