diff options
Diffstat (limited to 'include/net/ipv6.h')
-rw-r--r-- | include/net/ipv6.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/include/net/ipv6.h b/include/net/ipv6.h index c1f16fc49ade..f27fd83d67d8 100644 --- a/include/net/ipv6.h +++ b/include/net/ipv6.h | |||
@@ -126,15 +126,28 @@ extern struct ctl_path net_ipv6_ctl_path[]; | |||
126 | SNMP_ADD_STATS##modifier((net)->mib.statname##_statistics, (field), (val));\ | 126 | SNMP_ADD_STATS##modifier((net)->mib.statname##_statistics, (field), (val));\ |
127 | }) | 127 | }) |
128 | 128 | ||
129 | #define _DEVUPD(net, statname, modifier, idev, field, val) \ | ||
130 | ({ \ | ||
131 | struct inet6_dev *_idev = (idev); \ | ||
132 | if (likely(_idev != NULL)) \ | ||
133 | SNMP_UPD_PO_STATS##modifier((_idev)->stats.statname, field, (val)); \ | ||
134 | SNMP_UPD_PO_STATS##modifier((net)->mib.statname##_statistics, field, (val));\ | ||
135 | }) | ||
136 | |||
129 | /* MIBs */ | 137 | /* MIBs */ |
130 | 138 | ||
131 | #define IP6_INC_STATS(net, idev,field) \ | 139 | #define IP6_INC_STATS(net, idev,field) \ |
132 | _DEVINC(net, ipv6, , idev, field) | 140 | _DEVINC(net, ipv6, , idev, field) |
133 | #define IP6_INC_STATS_BH(net, idev,field) \ | 141 | #define IP6_INC_STATS_BH(net, idev,field) \ |
134 | _DEVINC(net, ipv6, _BH, idev, field) | 142 | _DEVINC(net, ipv6, _BH, idev, field) |
143 | #define IP6_ADD_STATS(net, idev,field,val) \ | ||
144 | _DEVADD(net, ipv6, , idev, field, val) | ||
135 | #define IP6_ADD_STATS_BH(net, idev,field,val) \ | 145 | #define IP6_ADD_STATS_BH(net, idev,field,val) \ |
136 | _DEVADD(net, ipv6, _BH, idev, field, val) | 146 | _DEVADD(net, ipv6, _BH, idev, field, val) |
137 | 147 | #define IP6_UPD_PO_STATS(net, idev,field,val) \ | |
148 | _DEVUPD(net, ipv6, , idev, field, val) | ||
149 | #define IP6_UPD_PO_STATS_BH(net, idev,field,val) \ | ||
150 | _DEVUPD(net, ipv6, _BH, idev, field, val) | ||
138 | #define ICMP6_INC_STATS(net, idev, field) \ | 151 | #define ICMP6_INC_STATS(net, idev, field) \ |
139 | _DEVINC(net, icmpv6, , idev, field) | 152 | _DEVINC(net, icmpv6, , idev, field) |
140 | #define ICMP6_INC_STATS_BH(net, idev, field) \ | 153 | #define ICMP6_INC_STATS_BH(net, idev, field) \ |