On 30/07/2025 14:44, Jakub Kicinski wrote:
On Wed, 30 Jul 2025 10:18:46 +0100 Vadim Fedorenko wrote:
IDK, 0,0 means all symbols were completely correct.
It may be useful for calculating bit error rate?
The standard doesn't have this bin, its value can be potentially
deducted from all packets counter.
We have a number of counters outside of the standard. Here the
extension is pretty trivial, so I don't see why we'd deprive
the user of the information HW collects. The translation between
bytes and symbols is not exact. Not sure we care about exactness
but, again, trivial to keep the 0,0 bin.
A workaround for having the {-1, -1} sentinel could also be to skip
the first entry:
if (i && !ranges[i].low && !ranges[i].high)
break;
I was thinking of this way, the problem is that in the core we rely on
the driver to provide at least 2 bins and we cannot add any compile-time
checks because it's all dynamic.
1 bin is no binning, its not a legit use of the histogram API.
We have a counter for corrected symbols already, that's the "1 bin".
Got it. Ok, I agree, we can keep bin (0,0) as the very first one, I'll
implement it in the way you suggested above