[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150822083916.GA17408@calimero.vinschen.de>
Date: Sat, 22 Aug 2015 10:39:16 +0200
From: Corinna Vinschen <vinschen@...hat.com>
To: Francois Romieu <romieu@...zoreil.com>
Cc: netdev@...r.kernel.org, Hayes Wang <hayeswang@...ltek.com>,
Ivan Vecera <ivecera@...hat.com>,
David Miller <davem@...emloft.net>,
nic_swsd <nic_swsd@...ltek.com>
Subject: Re: [PATCH v2 net-next] r8169: Add values missing in @get_stats64
from HW counters
On Aug 22 01:59, Francois Romieu wrote:
> Corinna Vinschen <vinschen@...hat.com> :
> > On Aug 21 21:39, Francois Romieu wrote:
> [...]
> > > The code should propagate failure when both rtl8169_reset_counters and
> > > rtl8169_update_counters fail.
> >
> > This one I don't understand. Neither failing to reset the counters nor
> > failing to update the counters is fatal for the driver. So far the
> > (unchanged) rtl8169_update_counters doesn't even print a log message,
>
> I wouldn't overestimate the value of log messages vs real status return.
> Users can be quite unhappy with default settings that spam their logs
> (it isn't a problem in open(), it's marginaly murphy plausible from
> a periodic get_stats context).
That won't happen with the current patch because only
rtl8169_reset_counters would print a log message, it's only called from
open, and open occurs rather seldom. Atop of that the code only tries
to reset counters on HW supporting it, and only if resetting on the HW
fails, there will be a log message at all. There's no reasonable chance
that failing to reset the counters will lead to log flooding.
> The driver can't propagate errors from the current get_stats context
> where rtl8169_update_counters is used. However it can be done in
> open().
>
> > while a failing reset in rtl8169_reset_counters now does.
> >
> > Why is that not sufficent?
>
> Because of the same reason(s) why this patch wants to improve things.
>
> It isn't a showstopper.
I'm not trying to avoid work, I'm trying to understand.
As far as I see it failing to reset the counters has no impact on the
viability of the code. It's still working with offsets and if the
offset is 0 or non-0, the user space won't see the difference in the
values returned by @get_stats64. Successful resetting the counters is
just a bonus.
Considering that failing rtl8169_reset_counters or failing
rtl8169_update_counters has no negative impact on open at all, the
problem I have here is:
What do you do with a return value from either one of these functions?
rtl_open () {
[...]
if (!rtl8169_reset_counters (dev)) {
/* ??? */
}
if (!rtl8169_update_counters (dev)) {
/* ??? */
}
[...]
}
Thanks,
Corinna
Content of type "application/pgp-signature" skipped
Powered by blists - more mailing lists