diff options
author | JP Abgrall <jpa@google.com> | 2011-09-15 00:56:20 -0700 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2011-11-30 21:39:06 -0800 |
commit | edbd09a6f47f62a4a58730b56d6fc4c2d460b68f (patch) | |
tree | 49368029b0d543d168cf66c486b92d9fbc76865f /net/netfilter/xt_qtaguid_print.h | |
parent | 09a6b855bd70cca4bcbb1b4602b079b27ea369c8 (diff) |
netfilter: xt_qtaguid: work around devices that reset their stats
Most net devs will not reset their stats when just going down/up,
unless a NETDEV_UNREGISTER was notified.
But some devs will not send out a NETDEV_UNREGISTER but still
reset their stats just before a NETDEV_UP.
Now we just track the dev stats during NETDEV_DOWN... just in case.
Then on NETDEV_UP we check the stats: if the device didn't do a
NETDEV_UNREGISTER and a prior NETDEV_DOWN captured stats, then we treat
it as an UNREGISTER and save the totals from the stashed values.
Added extra netdev event debugging.
Change-Id: Iec79e74bfd40269aa3e5892f161be71e09de6946
Signed-off-by: JP Abgrall <jpa@google.com>
Diffstat (limited to 'net/netfilter/xt_qtaguid_print.h')
-rw-r--r-- | net/netfilter/xt_qtaguid_print.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/netfilter/xt_qtaguid_print.h b/net/netfilter/xt_qtaguid_print.h index e26020c91dfc..388622860ea0 100644 --- a/net/netfilter/xt_qtaguid_print.h +++ b/net/netfilter/xt_qtaguid_print.h @@ -36,4 +36,7 @@ void prdebug_tag_stat_tree(int indent_level, struct rb_root *tag_stat_tree); void prdebug_iface_stat_list(int indent_level, struct list_head *iface_stat_list); + +/*------------------------------------------*/ +const char *netdev_evt_str(int netdev_event); #endif /* ifndef __XT_QTAGUID_PRINT_H__ */ |