On Wed, 22 May 2024 20:09:23 +0200 Morten Brørup <m...@smartsharesystems.com> wrote:
> > There are no size_bins in the current version of the patch. > > And the number of counters in ethdev part are small so it is less of a > > concern. > > The code is easier to maintain if the counter object is self contained. > > I agree that there are advantages to keeping the counter object self > contained. > > However, these counters are generic, so we cannot assume that there are only > very few, based on how the current software device drivers use them. > > Someone might want to add size_bins to the software device drivers. > And someone else might want to collect many counters in some application or > library structure. No. The implementation should be as simple and as small as possible for the use case that is presented in the patch series. Doing something more complex leads to the classic YAGNI situation, where when the new case really happens the implemenation just doesn't quite fit.