summaryrefslogtreecommitdiff
path: root/include/net/snmp.h
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2011-03-21 18:12:54 -0700
committerDavid S. Miller <davem@davemloft.net>2011-03-21 18:12:54 -0700
commit20246a800389fe5442675c59863fec5a4f520c7c (patch)
tree6a713be7255b973dfbf3178c64ae0e7ce94f7695 /include/net/snmp.h
parent8aa525a9340da4227797a06221ca08399006635f (diff)
snmp: SNMP_UPD_PO_STATS_BH() always called from softirq
We dont need to test if we run from softirq context, we definitely are. This saves few instructions in ip_rcv() & ip_rcv_finish() Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/snmp.h')
-rw-r--r--include/net/snmp.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/net/snmp.h b/include/net/snmp.h
index 762e2abce889..27461d6dd46f 100644
--- a/include/net/snmp.h
+++ b/include/net/snmp.h
@@ -150,7 +150,7 @@ struct linux_xfrm_mib {
#define SNMP_UPD_PO_STATS_BH(mib, basefield, addend) \
do { \
__typeof__(*mib[0]) *ptr = \
- __this_cpu_ptr((mib)[!in_softirq()]); \
+ __this_cpu_ptr((mib)[0]); \
ptr->mibs[basefield##PKTS]++; \
ptr->mibs[basefield##OCTETS] += addend;\
} while (0)
@@ -202,7 +202,7 @@ struct linux_xfrm_mib {
#define SNMP_UPD_PO_STATS64_BH(mib, basefield, addend) \
do { \
__typeof__(*mib[0]) *ptr; \
- ptr = __this_cpu_ptr((mib)[!in_softirq()]); \
+ ptr = __this_cpu_ptr((mib)[0]); \
u64_stats_update_begin(&ptr->syncp); \
ptr->mibs[basefield##PKTS]++; \
ptr->mibs[basefield##OCTETS] += addend; \