From: Corinna Vinschen <vinschen@redhat.com>
To: Francois Romieu <romieu@fr.zoreil.com>
Cc: netdev@vger.kernel.org, Hayes Wang <hayeswang@realtek.com>,
Ivan Vecera <ivecera@redhat.com>,
David Miller <davem@davemloft.net>,
nic_swsd <nic_swsd@realtek.com>
Subject: Re: [PATCH v2 net-next] r8169: Add values missing in @get_stats64 from HW counters
Date: Mon, 24 Aug 2015 09:33:48 +0200 [thread overview]
Message-ID: <20150824073348.GL19683@calimero.vinschen.de> (raw)
In-Reply-To: <20150822112334.GB24519@electric-eye.fr.zoreil.com>
[-- Attachment #1: Type: text/plain, Size: 1820 bytes --]
On Aug 22 13:23, Francois Romieu wrote:
> Corinna Vinschen <vinschen@redhat.com> :
> [...]
> > 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.
>
> Thanks for reformulating it. We are in violent agreement here.
>
> [...]
> > 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.
>
> Sorry, my english was really bad:
>
> the code should propagate failure when rtl8169_reset_counters and
> rtl8169_update_counters *simultaneously* fail.
Uhm... sorry, but that still doesn't answer the question. As you can
see in my patch, the initalization at open time is already encapsulated
in a function rtl8169_init_counter_offsets.
Assuming rtl8169_init_counter_offsets returns -1 if both functions,
rtl8169_reset_counters and rtl8169_update_counters fail.
Then... what?
Not being able to reset or update the counters is still not at all fatal
for the operation of the NIC as a whole and rtl_open in particular:
rtl_open()
{
[...]
/* This is non-fatal. */
if (!rtl8169_init_counter_offsets ()) {
/* What to do here??? */
}
[...]
}
Corinna
[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2015-08-24 7:33 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-18 9:04 [PATCH] r8169: Add values missing in @get_stats64 from HW counters Corinna Vinschen
2015-08-18 21:40 ` Francois Romieu
2015-08-19 2:05 ` David Miller
2015-08-19 9:10 ` Corinna Vinschen
2015-08-19 2:51 ` Hayes Wang
2015-08-19 9:13 ` Corinna Vinschen
2015-08-19 9:31 ` Hayes Wang
2015-08-19 13:07 ` Corinna Vinschen
2015-08-19 14:24 ` Corinna Vinschen
2015-08-19 19:24 ` Corinna Vinschen
2015-08-20 2:43 ` Hayes Wang
2015-08-20 9:41 ` Corinna Vinschen
2015-08-20 9:56 ` Hayes Wang
2015-08-21 10:09 ` [PATCH v2 net-next] " Corinna Vinschen
2015-08-21 10:24 ` Corinna Vinschen
2015-08-21 19:39 ` Francois Romieu
2015-08-21 22:07 ` Corinna Vinschen
2015-08-21 23:59 ` Francois Romieu
2015-08-22 8:39 ` Corinna Vinschen
2015-08-22 11:23 ` Francois Romieu
2015-08-24 7:33 ` Corinna Vinschen [this message]
2015-08-24 10:29 ` Corinna Vinschen
2015-08-24 23:33 ` Francois Romieu
2015-08-25 8:39 ` Corinna Vinschen
2015-08-25 21:14 ` Francois Romieu
2015-08-24 10:27 ` [PATCH v3 " Corinna Vinschen
2015-08-24 10:52 ` [PATCH v4 " Corinna Vinschen
2015-08-25 21:15 ` David Miller
2015-08-25 22:54 ` Francois Romieu
2015-08-25 22:59 ` David Miller
2015-08-25 23:03 ` David Miller
2015-08-26 8:55 ` Corinna Vinschen
2015-08-26 8:54 ` Corinna Vinschen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150824073348.GL19683@calimero.vinschen.de \
--to=vinschen@redhat.com \
--cc=davem@davemloft.net \
--cc=hayeswang@realtek.com \
--cc=ivecera@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=nic_swsd@realtek.com \
--cc=romieu@fr.zoreil.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).