On Sun, 18 Apr 2021 11:04:16 +0300 Ido Schimmel wrote: > On Fri, Apr 16, 2021 at 12:27:42PM -0700, Jakub Kicinski wrote: > > +/** > > + * struct ethtool_rmon_hist_range - byte range for histogram statistics > > + * @low: low bound of the bucket (inclusive) > > + * @high: high bound of the bucket (inclusive) > > + */ > > +struct ethtool_rmon_hist_range { > > + u16 low; > > + u16 high; > > Given ETHTOOL_A_STATS_GRP_HIST_BKT_{LOW,HI} are u32, should this also be > u32?
I felt a little bad about wasting memory in each driver. It's around 40B per driver. I thought we can adjust when needed given this is internal to the kernel, and static checkers should have no problem detecting truncation (or any rudimentary testing).