svn commit: r325239 - head/sys/dev/ena

Michał Krawczyk mk at semihalf.com
Wed Nov 22 16:19:56 UTC 2017


Hi Gleb,
We are counting the statistics in the software because of the alignment
with the newest ena-com API (HAL) which is delivered to us from NIC's
vendor.

Regarding fetching them periodically - there are 2 issues with that. First
of all, there may be problem with the counter overflow. Secondly, reading
statistics on demand requires sending admin message to the NIC and then the
cv_timedwait function is called to wait for the response. However there are
a lot of witness warnings when the cv_timedwait is called from the
if_get_counter() context, because of the non sleepable lock which is hold
there (I don't remember exactly which lock was causing this issue).

Best regards,
Michal

2017-11-22 1:08 GMT+01:00 Gleb Smirnoff <glebius at freebsd.org>:

>   Hi Martin and Michal,
>
> On Tue, Oct 31, 2017 at 04:31:23PM +0000, Marcin Wojtas wrote:
> M> Author: mw
> M> Date: Tue Oct 31 16:31:23 2017
> M> New Revision: 325239
> M> URL: https://svnweb.freebsd.org/changeset/base/325239
> M>
> M> Log:
> M>   Rework counting of hardware statistics in ENA driver
> M>
> M>   Do not read all statistics from the device, instead count them in the
> M>   driver except from RX drops - they are received directly from the NIC
> M>   in the AENQ descriptor.
> M>
> M>   Submitted by: Michal Krawczyk <mk at semihalf.com>
> M>   Reviewed by: imp
> M>   Obtained from: Semihalf
> M>   Sponsored by: Amazon.com, Inc.
> M>   Differential Revision: https://reviews.freebsd.org/D12852
>
> Is it possible not to count them in software, as well as not fetch
> them from hardware periodically, but instead just fetch them on
> demand, when either if_get_counter() or a sysctl is called?
>
> That would be more efficient.
>
> --
> Gleb Smirnoff
>


More information about the svn-src-head mailing list