Re: [PATCH net v2] net: ipa: properly limit modem routing table use

From: Alex Elder
Date: Tue Sep 20 2022 - 12:18:48 EST


On 9/20/22 10:14 AM, Jakub Kicinski wrote:
v2: Update the element info arrays defining the modified QMI message
so it uses the ipa_mem_bounds_ei structure rather than the
ipa_mem_array_ei structure. The message format is identical,
but the code was incorrect without that change.
Unclear to me why, ipa_mem_bounds_ei and ipa_mem_array_ei seem
identical, other than s/end/count/. Overall the patch feels
a touch too verbose for a fix, makes it harder to grasp the key
functional change IMHO. I could be misunderstanding but please
keep the goal of making fixes small and crisp in mind for the future.

I see you've already accepted the patch, and I appreciate that.

The verbosity was because it was maybe a subtle difference
and I failed to be more concise describing it.

Over the wire, the ipa_mem_bounds and ipa_mem_array *look*
identical (both are a pair of 32-bit unsigned values).

But they are *semantically* different. The "array" is a
base offset and number of entries. The "bounds" specifies
the start and last offset (one less than the number of
entries).

So the type has changed to try to make the distinction
clearer. I realize neither the compiler nor the QMI
implementation will distinguish it, but the hope is that
the human reader can derive some value from it.

I don't want to be any more verbose, so I'll leave it at
that.

-Alex