Thread (9 messages) 9 messages, 3 authors, 21d ago

Re: [PATCH net-next v5 5/5] ionic: Add .get_fec_stats ethtool handler

From: Eric Joyner <hidden>
Date: 2026-06-30 18:24:19

On 6/15/2026 6:27 PM, Jakub Kicinski wrote:
Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.


On Sun, 14 Jun 2026 13:53:03 -0700 Eric Joyner wrote:
quoted
+             if (fec_cw_err_bin != IONIC_STAT_INVALID)
+                     hist->values[i].sum = le64_to_cpu(fec_cw_err_bin);
+             else
+                     hist->values[i].sum = 0;
Setting the sum to zero is very much against the API contract with
ethtool, no? Since we are just digging ourselves out of a whole with
the link down events maybe let's be more strict going forward. :S

I think mlx5 had a similar problem of not knowing bucket count.
You can put the bucket table in some driver struct and populate it
at runtime.

Looking at this scheme, tho, I think the ethtool core is buggy for
mlx5 :/ We should make a copy of the hist table, because we write
the Netlink attrs after releasing the locks. Another call may start
already and make the driver write its table in parallel.

Please send a fix for that if you can, or LMK if not, I'll chase
one of the people involved in adding the fec stats.

I'll apply the first 4 patches here in the meantime.
Yeah, I'll work on a fix.

(Just to say that I didn't forget about this!)

- Eric

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help