From: Eric Dumazet <eric.dumazet@gmail.com>
To: David Miller <davem@davemloft.net>
Cc: shemminger@vyatta.com, tklauser@distanz.ch,
linux@arm.linux.org.uk, netdev@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
kernel-janitors@vger.kernel.org, error27@gmail.com
Subject: [PATCH net-next-2.6] atm: remove a net_device_stats clear
Date: Wed, 18 Aug 2010 22:44:34 +0200 [thread overview]
Message-ID: <1282164274.2328.2.camel@edumazet-laptop> (raw)
In-Reply-To: <20100818.131043.226780154.davem@davemloft.net>
Le mercredi 18 août 2010 à 13:10 -0700, David Miller a écrit :
> From: Stephen Hemminger <shemminger@vyatta.com>
> Date: Wed, 18 Aug 2010 08:33:04 -0700
>
> > On Wed, 18 Aug 2010 09:04:24 +0200
> > Tobias Klauser <tklauser@distanz.ch> wrote:
> >
> >>
> >> - memset (&priv(dev)->stats, 0, sizeof (struct net_device_stats));
> >> + memset(&dev->stats, 0, sizeof(struct net_device_stats));
> >
> > This is incorrect, just remove the memset. The stats are initialized
> > when device is created. The Linux device driver convention is to
> > keep stats when device is set down and brought back up; that is what
> > the majority of other drivers do.
>
> Yep, both the ether1 and ether3 patch have this problem. Looks
> like we'll see v4 coming some :-)
To be fair, we accepted some bits like that in the past ;)
[PATCH net-next-2.6] atm: remove a net_device_stats clear
No need to clear device stats in lec_open()
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
---
net/atm/lec.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/net/atm/lec.c b/net/atm/lec.c
index d98bde1..181d70c 100644
--- a/net/atm/lec.c
+++ b/net/atm/lec.c
@@ -220,7 +220,6 @@ static unsigned char *get_tr_dst(unsigned char *packet, unsigned char *rdesc)
static int lec_open(struct net_device *dev)
{
netif_start_queue(dev);
- memset(&dev->stats, 0, sizeof(struct net_device_stats));
return 0;
}
next prev parent reply other threads:[~2010-08-18 20:44 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-17 16:15 [PATCH] ether1: Use net_device_stats from struct net_device Tobias Klauser
2010-08-17 18:32 ` Dan Carpenter
2010-08-17 18:34 ` Tobias Klauser
2010-08-18 7:04 ` [PATCH v2] " Tobias Klauser
2010-08-18 8:13 ` Russell King - ARM Linux
2010-08-18 8:27 ` Eric Dumazet
2010-08-18 8:33 ` Tobias Klauser
2010-08-18 15:33 ` Stephen Hemminger
2010-08-18 20:10 ` David Miller
2010-08-18 20:44 ` Eric Dumazet [this message]
2010-08-19 7:15 ` [PATCH net-next-2.6] atm: remove a net_device_stats clear David Miller
2010-08-19 6:14 ` [PATCH v2] ether1: Use net_device_stats from struct net_device Tobias Klauser
2010-08-18 8:45 ` [PATCH v3] " Tobias Klauser
2010-08-19 6:15 ` [PATCH v4] " Tobias Klauser
2010-08-19 7:12 ` David Miller
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=1282164274.2328.2.camel@edumazet-laptop \
--to=eric.dumazet@gmail.com \
--cc=davem@davemloft.net \
--cc=error27@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux@arm.linux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=shemminger@vyatta.com \
--cc=tklauser@distanz.ch \
/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