Re: [RFC PATCH net-next v2 6/6] devlink: add overwrite mode to flash update

From
Jacob Keller <jacob.e.keller@intel.com>
Date
2020-07-28 16:58:47
Reply to
Jiri Pirko, 2020-07-28

On 7/28/2020 4:19 AM, Jiri Pirko wrote:
Yes. Documentation is very easy to ignore unfortunatelly. The driver
developer has to be tight up by the core code and api, I believe.
So I'm not sure what the best proposal here is. We do have a list of
generic components, but given that each piece of HW has different
elements, it's not always feasible to have fully generic names. Some of
the names are driver specific.

I guess we could use some system where components are "registered" when
loading the devlink, so that they can be verified by the stack when used
as a parameter for flash update? Perhaps take something like the
table-driven approach used for infos and extend that into devlink core
so that drivers basically register a table of the components which
includes both a function callback that gets the version string as well
as an indication of whether that component can be updated via flash_update?

I know it would also be useful for ice to have a sort of "pre-info"
callback that generates a context structure that is passed to each of
the info callbacks. (that way a single up-front step could be to lookup
the relevant information, and this is then forwarded to each of the
formatter functions for each component).

Am I on the right track here or just over-engineering?
Thread (35 messages) 35 messages, 4 authors, last reply 2020-07-29
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help