lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20100502.222925.171497866.davem@davemloft.net>
Date:	Sun, 02 May 2010 22:29:25 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	eric.dumazet@...il.com
Cc:	xiaosuo@...il.com, netdev@...r.kernel.org
Subject: Re: [PATCH v3] net: fix softnet_stat

From: Eric Dumazet <eric.dumazet@...il.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@...il.com>
> 
> Thats a fine patch, thanks Changli.
> 
> Signed-off-by: Eric Dumazet <eric.dumazet@...il.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@...emloft.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

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ