Re: [PATCH net] mlxsw: Initialize register query payloads

From: Björn Töpel

Date: Fri Oct 16 2026 - 06:57:57 EST


Ido Schimmel <idosch@xxxxxxxxxx> writes:

> On Thu, Oct 15, 2026 at 09:48:14AM +0200, Björn Töpel wrote:
>> Hmm, isn't this pointing to that the query should be more robust,
>> instead of relying on zeroing receive buffers pre-call? Maybe just fixup
>> query instead?
>
> Most registers require an index, so the common pattern is:
>
> mlxsw_reg_*_pack(...);
> mlxsw_reg_query(...);
>
> Where the pack function zeroes the payload. We can't zero in the core
> because then we would overwrite the indexes.

Got it! Thanks for clearing that up!


Björn