# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
# 2005/04/01 14:24:14+02:00 tgraf@xxxxxxx
# [NET]: Allow dumping of application specific statistics if no primary TLV
is used
#
# Although this case is hypothetical at the moment, more advanced actions are
# likely to need this in the future.
#
# Signed-off-by: Thomas Graf <tgraf@xxxxxxx>
# Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
#
# net/core/gen_stats.c
# 2005/04/01 14:23:57+02:00 tgraf@xxxxxxx +7 -4
# [NET]: Allow dumping of application specific statistics if no primary TLV
is used
#
# include/net/gen_stats.h
# 2005/04/01 14:23:57+02:00 tgraf@xxxxxxx +2 -1
# [NET]: Allow dumping of application specific statistics if no primary TLV
is used
#
diff -Nru a/include/net/gen_stats.h b/include/net/gen_stats.h
--- a/include/net/gen_stats.h 2005-04-02 01:18:33 +02:00
+++ b/include/net/gen_stats.h 2005-04-02 01:18:33 +02:00
@@ -15,7 +15,8 @@
/* Backward compatability */
int compat_tc_stats;
int compat_xstats;
- struct rtattr * xstats;
+ void * xstats;
+ int xstats_len;
struct tc_stats tc_stats;
};
diff -Nru a/net/core/gen_stats.c b/net/core/gen_stats.c
--- a/net/core/gen_stats.c 2005-04-02 01:18:33 +02:00
+++ b/net/core/gen_stats.c 2005-04-02 01:18:33 +02:00
@@ -177,8 +177,11 @@
int
gnet_stats_copy_app(struct gnet_dump *d, void *st, int len)
{
- if (d->compat_xstats)
- d->xstats = (struct rtattr *) d->skb->tail;
+ if (d->compat_xstats) {
+ d->xstats = st;
+ d->xstats_len = len;
+ }
+
return gnet_stats_copy(d, TCA_STATS_APP, st, len);
}
@@ -206,8 +209,8 @@
return -1;
if (d->compat_xstats && d->xstats) {
- if (gnet_stats_copy(d, d->compat_xstats, RTA_DATA(d->xstats),
- RTA_PAYLOAD(d->xstats)) < 0)
+ if (gnet_stats_copy(d, d->compat_xstats, d->xstats,
+ d->xstats_len) < 0)
return -1;
}
|