From: David Miller <davem@davemloft.net>
To: eric.dumazet@gmail.com
Cc: xiaosuo@gmail.com, netdev@vger.kernel.org
Subject: Re: [PATCH v3] net: fix softnet_stat
Date: Sun, 02 May 2010 22:29:25 -0700 (PDT) [thread overview]
Message-ID: <20100502.222925.171497866.davem@davemloft.net> (raw)
In-Reply-To: <1272818607.2173.133.camel@edumazet-laptop>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Sun, 02 May 2010 18:43:27 +0200
> Le dimanche 02 mai 2010 à 23:42 +0800, Changli Gao a écrit :
>> fix softnet_stat
>>
>> Per cpu variable softnet_data.total was shared between IRQ and SoftIRQ context
>> without any protection. And enqueue_to_backlog should update the netdev_rx_stat
>> of the target CPU.
>>
>> This patch renames softnet_data.total to softnet_data.processed: the number of
>> packets processed in uppper levels(IP stacks).
>>
>> softnet_stat data is moved into softnet_data.
>>
>> Signed-off-by: Changli Gao <xiaosuo@gmail.com>
>
> Thats a fine patch, thanks Changli.
>
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Applied thanks.
I applied this follow-on patch to take the opportunity to clean up
something that has been bugging me for a long time, but never had the
energy to take care of :-)
net: Use explicit "unsigned int" instead of plain "unsigned" in netdevice.h
Signed-off-by: David S. Miller <davem@davemloft.net>
---
include/linux/netdevice.h | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index c39938f..98112fb 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -878,7 +878,7 @@ struct net_device {
unsigned char operstate; /* RFC2863 operstate */
unsigned char link_mode; /* mapping policy to operstate */
- unsigned mtu; /* interface MTU value */
+ unsigned int mtu; /* interface MTU value */
unsigned short type; /* interface hardware type */
unsigned short hard_header_len; /* hardware hdr length */
@@ -1381,10 +1381,10 @@ struct softnet_data {
struct sk_buff_head process_queue;
/* stats */
- unsigned processed;
- unsigned time_squeeze;
- unsigned cpu_collision;
- unsigned received_rps;
+ unsigned int processed;
+ unsigned int time_squeeze;
+ unsigned int cpu_collision;
+ unsigned int received_rps;
#ifdef CONFIG_RPS
struct softnet_data *rps_ipi_list;
--
1.7.0.4
prev parent reply other threads:[~2010-05-03 5:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-02 15:42 [PATCH v3] net: fix softnet_stat Changli Gao
2010-05-02 16:43 ` Eric Dumazet
2010-05-03 5:29 ` David Miller [this message]
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=20100502.222925.171497866.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=xiaosuo@gmail.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