diff options
author | Tom Herbert <therbert@google.com> | 2010-04-22 03:00:24 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-04-22 19:00:00 -0400 |
commit | aa2ea0586d9dbe56a334d835a43b45e8c2104e77 (patch) | |
tree | 1f218166bff8513858ac253e84264a4a8fe9ff0d /include/net | |
parent | 3cfa856d6d43894ebffdc28d2f0587595280893b (diff) |
tcp: fix outsegs stat for TSO segments
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 <therbert@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/snmp.h | 2 | ||||
-rw-r--r-- | include/net/tcp.h | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/include/net/snmp.h b/include/net/snmp.h index 884fdbb74b23..92456f1035f5 100644 --- a/include/net/snmp.h +++ b/include/net/snmp.h | |||
@@ -133,6 +133,8 @@ struct linux_xfrm_mib { | |||
133 | __this_cpu_add(mib[0]->mibs[field], addend) | 133 | __this_cpu_add(mib[0]->mibs[field], addend) |
134 | #define SNMP_ADD_STATS_USER(mib, field, addend) \ | 134 | #define SNMP_ADD_STATS_USER(mib, field, addend) \ |
135 | this_cpu_add(mib[1]->mibs[field], addend) | 135 | this_cpu_add(mib[1]->mibs[field], addend) |
136 | #define SNMP_ADD_STATS(mib, field, addend) \ | ||
137 | this_cpu_add(mib[0]->mibs[field], addend) | ||
136 | /* | 138 | /* |
137 | * Use "__typeof__(*mib[0]) *ptr" instead of "__typeof__(mib[0]) ptr" | 139 | * Use "__typeof__(*mib[0]) *ptr" instead of "__typeof__(mib[0]) ptr" |
138 | * to make @ptr a non-percpu pointer. | 140 | * to make @ptr a non-percpu pointer. |
diff --git a/include/net/tcp.h b/include/net/tcp.h index b7d83d204a93..3f87fd87bc9c 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
@@ -294,6 +294,7 @@ extern struct proto tcp_prot; | |||
294 | #define TCP_INC_STATS_BH(net, field) SNMP_INC_STATS_BH((net)->mib.tcp_statistics, field) | 294 | #define TCP_INC_STATS_BH(net, field) SNMP_INC_STATS_BH((net)->mib.tcp_statistics, field) |
295 | #define TCP_DEC_STATS(net, field) SNMP_DEC_STATS((net)->mib.tcp_statistics, field) | 295 | #define TCP_DEC_STATS(net, field) SNMP_DEC_STATS((net)->mib.tcp_statistics, field) |
296 | #define TCP_ADD_STATS_USER(net, field, val) SNMP_ADD_STATS_USER((net)->mib.tcp_statistics, field, val) | 296 | #define TCP_ADD_STATS_USER(net, field, val) SNMP_ADD_STATS_USER((net)->mib.tcp_statistics, field, val) |
297 | #define TCP_ADD_STATS(net, field, val) SNMP_ADD_STATS((net)->mib.tcp_statistics, field, val) | ||
297 | 298 | ||
298 | extern void tcp_v4_err(struct sk_buff *skb, u32); | 299 | extern void tcp_v4_err(struct sk_buff *skb, u32); |
299 | 300 | ||