On 29/07/2025 14:48, Andrew Lunn wrote:
+        name: fec-hist-bin-low
+        type: s32

Signed 32 bit

+struct ethtool_fec_hist_range {
+       s16 low;

Signed 16 bit.

+               if (nla_put_u32(skb, ETHTOOL_A_FEC_STAT_FEC_HIST_BIN_LOW,
+                               ranges[i].low) ||

Unsigned 32 bit.

Could we have some consistency with the types.

Yeah, it looks a bit messy. AFAIK, any type of integer less than 32 bits
will be extended to 32 bits anyway, so I believe it's ok to keep smaller
memory footprint for the histogram definition in the driver but still use s32 as netlink attr type. I'll change the code to use nla_put_s32()
to keep sign info.

Does it look OK?



        Andrew

Reply via email to