[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220531080555.29b6ec6b@kernel.org>
Date: Tue, 31 May 2022 08:05:55 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Jiri Pirko <jiri@...nulli.us>
Cc: Ido Schimmel <idosch@...sch.org>, Ido Schimmel <idosch@...dia.com>,
netdev@...r.kernel.org, davem@...emloft.net, pabeni@...hat.com,
jiri@...dia.com, petrm@...dia.com, dsahern@...il.com,
andrew@...n.ch, mlxsw@...dia.com
Subject: Re: [PATCH net-next 00/11] mlxsw: extend line card model by devices
and info
On Tue, 31 May 2022 09:11:27 +0200 Jiri Pirko wrote:
> >Nevermind, I think we can iterate over all the groupings.
> >Since I hope you agreed that component has an established
>
> Yeah, component=version. I will send a RFC soon that tights it together.
>
> >meaning can we use group instead?
>
> Group of what? Could you provide me example what you mean?
Group of components. As explained component has an existing meaning,
we can't reuse the term with a different one now.
> >> Sorry, I'm a bit lost. Could you please provide some example about how
> >> you envision it? For me it is a guessing game :/
> >> My guess is you would like to add to the version nest where
> >> DEVLINK_ATTR_INFO_VERSION_NAME resides for example
> >> DEVLINK_ATTR_LINECARD_INDEX?
> >>
> >> Correct?
> >
> >Yup.
>
> Hmm, in that case, I'm not sure how to do this. As cmd options and
> outputs should match, we would have:
>
> devlink dev info
> lc2.fw 19.2010.1310
>
> here lc2 and fw are concatenated from DEVLINK_ATTR_LINECARD_INDEX and DEVLINK_ATTR_INFO_VERSION_NAME
lc2 is the group name.
> Now on devlink dev flash side, when I pass "component lc2.fw", how could
> the "devlink dev flash" know to divide it to DEVLINK_ATTR_LINECARD_INDEX
> and FLASH_COMPONENT? Should I parse the cmd line option and figure the
> "lcX." prefix into an attribute?
>
> Or, we would have to have something like:
> devlink dev flash pci/0000:01:00.0 lc 2 component fw file mellanox/fw-AGB-rel-19_2010_1312-022-EVB.mfa2
Yup, it'll make DaveA happy as well.
> But to be consistent with the output, we would have to change "devlink
> dev info" to something like:
> pci/0000:01:00.0:
> versions:
> running:
> fw 1.2.3
> fw.mgmt 10.20.30
> lc 2 fw 19.2010.1310
Yup.
> But that would break the existing JSON output, because "running" is an array:
> "running": {
> "fw": "1.2.3",
> "fw.mgmt": "10.20.30"
> },
No, the lc versions should be in separate nests. Since they are not
updated when flashing main FW mixing them into existing versions would
break uAPI.
> So probably better to stick to "lcx.y" notation in both devlink dev info
> and flash and split/squash to attributes internally. What do you think?
BTW how do you intend to activate the new FW? Extend the reload command?
Powered by blists - more mailing lists