<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/include/net/snmp.h, branch v3.0.86</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/include/net/snmp.h?h=v3.0.86</id>
<link rel='self' href='https://git.amat.us/linux/atom/include/net/snmp.h?h=v3.0.86'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2011-05-19T20:21:22Z</updated>
<entry>
<title>ipv6: reduce per device ICMP mib sizes</title>
<updated>2011-05-19T20:21:22Z</updated>
<author>
<name>Eric Dumazet</name>
<email>eric.dumazet@gmail.com</email>
</author>
<published>2011-05-19T01:14:23Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=be281e554e2a4cf2478df7a8b8926c89454bccfa'/>
<id>urn:sha1:be281e554e2a4cf2478df7a8b8926c89454bccfa</id>
<content type='text'>
ipv6 has per device ICMP SNMP counters, taking too much space because
they use percpu storage.

needed size per device is :
(512+4)*sizeof(long)*number_of_possible_cpus*2

On a 32bit kernel, 16 possible cpus, this wastes more than 64kbytes of
memory per ipv6 enabled network device, taken in vmalloc pool.

Since ICMP messages are rare, just use shared counters (atomic_long_t)

Per network space ICMP counters are still using percpu memory, we might
also convert them to shared counters in a future patch.

Signed-off-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
CC: Denys Fedoryshchenko &lt;denys@visp.net.lb&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>snmp: SNMP_UPD_PO_STATS_BH() always called from softirq</title>
<updated>2011-03-22T01:12:54Z</updated>
<author>
<name>Eric Dumazet</name>
<email>eric.dumazet@gmail.com</email>
</author>
<published>2011-03-22T01:12:54Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=20246a800389fe5442675c59863fec5a4f520c7c'/>
<id>urn:sha1:20246a800389fe5442675c59863fec5a4f520c7c</id>
<content type='text'>
We dont need to test if we run from softirq context, we definitely are.

This saves few instructions in ip_rcv() &amp; ip_rcv_finish()

Signed-off-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: kill unused macros from head file</title>
<updated>2010-12-02T21:27:33Z</updated>
<author>
<name>Shan Wei</name>
<email>shanwei@cn.fujitsu.com</email>
</author>
<published>2010-12-01T18:05:17Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=dca9b2404a6d6579828da2425c051462701efd3f'/>
<id>urn:sha1:dca9b2404a6d6579828da2425c051462701efd3f</id>
<content type='text'>
These macros have been defined for several years since v2.6.12-rc2（tracing by git）,
but never be used. So remove them.

Signed-off-by: Shan Wei &lt;shanwei@cn.fujitsu.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: snmp: fix the wrong ICMP_MIB_MAX value</title>
<updated>2010-12-02T21:27:31Z</updated>
<author>
<name>Shan Wei</name>
<email>shanwei@cn.fujitsu.com</email>
</author>
<published>2010-12-01T18:04:43Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=a9527a3b621e507c85b639c183c3aa22afd4eb61'/>
<id>urn:sha1:a9527a3b621e507c85b639c183c3aa22afd4eb61</id>
<content type='text'>
__ICMP_MIB_MAX is equal to the total number of icmp mib,
So no need to add 1. This wastes 4/8 bytes memory.

Change it to be same as ICMP6_MIB_MAX, TCP_MIB_MAX, UDP_MIB_MAX.

Signed-off-by: Shan Wei &lt;shanwei@cn.fujitsu.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>snmp: 64bit ipstats_mib for all arches</title>
<updated>2010-06-30T20:31:19Z</updated>
<author>
<name>Eric Dumazet</name>
<email>eric.dumazet@gmail.com</email>
</author>
<published>2010-06-30T20:31:19Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=4ce3c183fcade7f4b30a33dae90cd774c3d9e094'/>
<id>urn:sha1:4ce3c183fcade7f4b30a33dae90cd774c3d9e094</id>
<content type='text'>
/proc/net/snmp and /proc/net/netstat expose SNMP counters.

Width of these counters is either 32 or 64 bits, depending on the size
of "unsigned long" in kernel.

This means user program parsing these files must already be prepared to
deal with 64bit values, regardless of user program being 32 or 64 bit.

This patch introduces 64bit snmp values for IPSTAT mib, where some
counters can wrap pretty fast if they are 32bit wide.

# netstat -s|egrep "InOctets|OutOctets"
    InOctets: 244068329096
    OutOctets: 244069348848

Signed-off-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>snmp: fix SNMP_ADD_STATS()</title>
<updated>2010-06-23T18:48:19Z</updated>
<author>
<name>Eric Dumazet</name>
<email>eric.dumazet@gmail.com</email>
</author>
<published>2010-06-23T00:32:03Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8f1c14b2e3b1805d3e9e6a306d07f5371ea703a7'/>
<id>urn:sha1:8f1c14b2e3b1805d3e9e6a306d07f5371ea703a7</id>
<content type='text'>
commit aa2ea0586d9d (tcp: fix outsegs stat for TSO segments) incorrectly
assumed SNMP_ADD_STATS() was used from BH context.

Fix this using mib[!in_softirq()] instead of mib[0]

Signed-off-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
CC: Tom Herbert &lt;therbert@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>tcp: fix outsegs stat for TSO segments</title>
<updated>2010-04-22T23:00:00Z</updated>
<author>
<name>Tom Herbert</name>
<email>therbert@google.com</email>
</author>
<published>2010-04-22T07:00:24Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=aa2ea0586d9dbe56a334d835a43b45e8c2104e77'/>
<id>urn:sha1:aa2ea0586d9dbe56a334d835a43b45e8c2104e77</id>
<content type='text'>
Account for TSO segments of an skb in TCP_MIB_OUTSEGS counter.  Without
doing this, the counter can be off by orders of magnitude from the
actual number of segments sent.

Signed-off-by: Tom Herbert &lt;therbert@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: snmp mib cleanup</title>
<updated>2010-03-22T01:34:16Z</updated>
<author>
<name>Eric Dumazet</name>
<email>eric.dumazet@gmail.com</email>
</author>
<published>2010-03-18T20:36:06Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ec733b15a3ef0b5759141a177f8044a2f40c41e7'/>
<id>urn:sha1:ec733b15a3ef0b5759141a177f8044a2f40c41e7</id>
<content type='text'>
There is no point to align or pad mibs to cache lines, they are per cpu
allocated with a 8 bytes alignment anyway.
This wastes space for no gain. This patch removes __SNMP_MIB_ALIGN__

Since SNMP mibs contain "unsigned long" fields only, we can relax the
allocation alignment from "unsigned long long" to "unsigned long"

Signed-off-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>percpu: add __percpu sparse annotations to net</title>
<updated>2010-02-17T07:05:38Z</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2010-02-16T15:20:26Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=7d720c3e4f0c4fc152a6bf17e24244a3c85412d2'/>
<id>urn:sha1:7d720c3e4f0c4fc152a6bf17e24244a3c85412d2</id>
<content type='text'>
Add __percpu sparse annotations to net.

These annotations are to make sparse consider percpu variables to be
in a different address space and warn if accessed without going
through percpu accessors.  This patch doesn't affect normal builds.

The macro and type tricks around snmp stats make things a bit
interesting.  DEFINE/DECLARE_SNMP_STAT() macros mark the target field
as __percpu and SNMP_UPD_PO_STATS() macro is updated accordingly.  All
snmp_mib_*() users which used to cast the argument to (void **) are
updated to cast it to (void __percpu **).

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Acked-by: David S. Miller &lt;davem@davemloft.net&gt;
Cc: Patrick McHardy &lt;kaber@trash.net&gt;
Cc: Arnaldo Carvalho de Melo &lt;acme@ghostprotocols.net&gt;
Cc: Vlad Yasevich &lt;vladislav.yasevich@hp.com&gt;
Cc: netdev@vger.kernel.org
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: constify MIB name tables</title>
<updated>2010-01-23T09:21:27Z</updated>
<author>
<name>Alexey Dobriyan</name>
<email>adobriyan@gmail.com</email>
</author>
<published>2010-01-22T10:17:26Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5833929cc2ad2b3064b4fac8c44e293972d240d8'/>
<id>urn:sha1:5833929cc2ad2b3064b4fac8c44e293972d240d8</id>
<content type='text'>
Signed-off-by: Alexey Dobriyan &lt;adobriyan@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
