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

From
Jiri Pirko <jiri@resnulli.us>
Date
2020-07-26 07:18:39
Reply to
Jacob Keller, 2020-07-22
Wed, Jul 22, 2020 at 08:21:22PM CEST, jacob.e.keller@intel.com wrote:

On 7/22/2020 9:52 AM, Jakub Kicinski wrote:
quoted
On Wed, 22 Jul 2020 15:30:05 +0000 Keller, Jacob E wrote:
quoted
quoted
So perhaps we can introduce something like "component mask", which would
allow to flash only part of the component. That is basically what Jacob
has, I would just like to have it well defined.
So, we could make this selection a series of masked bits instead of a
single enumeration value.
I'd still argue that components (as defined in devlink info) and config
are pretty orthogonal. In my experience config is stored in its own
section of the flash, and some of the knobs are in no obvious way
associated with components (used by components).

That said, if we rename the "component mask" to "update mask" that's
fine with me.

Then we'd have

bit 0 - don't overwrite config
bit 1 - don't overwrite identifiers

? 

Let's define a bit for "don't update program" when we actually need it.

Ok. And this can be later extended with additional bits with new
meanings should the need arise.

Additionally, drivers can ensure that the valid combination of bits is
set. the drivers can reject requests for combinations that they do not
support.
Makes sense.
I can make that change.

My preference is that "0" for a bit means do not overwrite while "1"
means overwrite. This way, if/when additional bits are added, drivers
won't need to be updated to reject such requests. If we make "1" the "do
not overwrite" then we'd have a case where drivers must update to ensure
they reject requests which don't set the bit.
0 should be default and driver should bahave accordingly.

Thanks,
Jake
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