Subject: RE: [PATCH v1 net-next 2/2] net: ena: Extend customer metrics reporting support

From: "Arinzon, David" <[email-masked]>
Date: Tue, 13 Aug 2024 11:29:50 +0000

> On Sun, 11 Aug 2024 13:07:11 +0300 David Arinzon wrote:
> > +     ENA_ADMIN_BW_IN_ALLOWANCE_EXCEEDED         = 0,
> > +     ENA_ADMIN_BW_OUT_ALLOWANCE_EXCEEDED        = 1,
> > +     ENA_ADMIN_PPS_ALLOWANCE_EXCEEDED           = 2,
> > +     ENA_ADMIN_CONNTRACK_ALLOWANCE_EXCEEDED     = 3,
> > +     ENA_ADMIN_LINKLOCAL_ALLOWANCE_EXCEEDED     = 4,
> > +     ENA_ADMIN_CONNTRACK_ALLOWANCE_AVAILABLE    = 5,
> 
> We have similar stats in the standard "queue-capable" stats:
> 
> https://docs.kernel.org/next/networking/netlink_spec/netdev.html#rx-hw-
> drop-ratelimits-uint
> https://docs.kernel.org/next/networking/netlink_spec/netdev.html#tx-hw-
> drop-ratelimits-uint
> 
> they were added based on the virtio stats spec. They appear to map very
> neatly to the first stats you have. Drivers must report the stats via a common
> API if one exists.
> --
> pw-bot: cr

Thank you for bringing this to our attention, Jakub.

I will note that this patch modifies the infrastructure/logic in which these stats are retrieved to allow expandability and flexibility of the interface between the driver and the device (written in the commit message).
The top five (0 - 4) are already part of the upstream code and the last one (5) is added in this patch.

The statistics discussed here and are exposed by ENA are not on a queue level but on an interface level, therefore, I am not sure that the ones pointed out by you would be a good fit for us.

But in any case, would it be possible from your point of view to progress in two paths, one would be this patchset with the addition of the new metric and another would be to explore whether there are such stats on an interface level that can be exposed?

Thanks,
David