Commit 20246a800389fe5442675c59863fec5a4f520c7c
Committed by
David S. Miller
1 parent
8aa525a934
Exists in
master
and in
7 other branches
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>
Showing 1 changed file with 2 additions and 2 deletions Side-by-side Diff
include/net/snmp.h
... | ... | @@ -150,7 +150,7 @@ |
150 | 150 | #define SNMP_UPD_PO_STATS_BH(mib, basefield, addend) \ |
151 | 151 | do { \ |
152 | 152 | __typeof__(*mib[0]) *ptr = \ |
153 | - __this_cpu_ptr((mib)[!in_softirq()]); \ | |
153 | + __this_cpu_ptr((mib)[0]); \ | |
154 | 154 | ptr->mibs[basefield##PKTS]++; \ |
155 | 155 | ptr->mibs[basefield##OCTETS] += addend;\ |
156 | 156 | } while (0) |
... | ... | @@ -202,7 +202,7 @@ |
202 | 202 | #define SNMP_UPD_PO_STATS64_BH(mib, basefield, addend) \ |
203 | 203 | do { \ |
204 | 204 | __typeof__(*mib[0]) *ptr; \ |
205 | - ptr = __this_cpu_ptr((mib)[!in_softirq()]); \ | |
205 | + ptr = __this_cpu_ptr((mib)[0]); \ | |
206 | 206 | u64_stats_update_begin(&ptr->syncp); \ |
207 | 207 | ptr->mibs[basefield##PKTS]++; \ |
208 | 208 | ptr->mibs[basefield##OCTETS] += addend; \ |