64 lines
2.0 KiB
Diff
64 lines
2.0 KiB
Diff
Index: iproute2-2.6.33/include/linux/gen_stats.h
|
|
===================================================================
|
|
--- iproute2-2.6.33.orig/include/linux/gen_stats.h 2010-02-25 11:56:50.000000000 +0800
|
|
+++ iproute2-2.6.33/include/linux/gen_stats.h 2014-01-07 11:04:04.000000000 +0800
|
|
@@ -21,6 +21,9 @@
|
|
struct gnet_stats_basic {
|
|
__u64 bytes;
|
|
__u32 packets;
|
|
+#if 1 /* ZyXEL QoS, porting from MSTC */
|
|
+ __u64 dropbytes;
|
|
+#endif
|
|
};
|
|
struct gnet_stats_basic_packed {
|
|
__u64 bytes;
|
|
@@ -35,6 +38,9 @@
|
|
struct gnet_stats_rate_est {
|
|
__u32 bps;
|
|
__u32 pps;
|
|
+#if 1 /* ZyXEL QoS, porting from MSTC */
|
|
+ __u32 dropbps;
|
|
+#endif
|
|
};
|
|
|
|
/**
|
|
Index: iproute2-2.6.33/include/linux/pkt_sched.h
|
|
===================================================================
|
|
--- iproute2-2.6.33.orig/include/linux/pkt_sched.h 2010-02-25 11:56:50.000000000 +0800
|
|
+++ iproute2-2.6.33/include/linux/pkt_sched.h 2014-01-07 11:04:49.000000000 +0800
|
|
@@ -37,6 +37,9 @@
|
|
* flow goes out of allocated bandwidth */
|
|
__u32 bps; /* Current flow byte rate */
|
|
__u32 pps; /* Current flow packet rate */
|
|
+#if 1 /* ZyXEL QoS, porting from MSTC */
|
|
+ __u32 dropbps;
|
|
+#endif
|
|
__u32 qlen;
|
|
__u32 backlog;
|
|
};
|
|
Index: iproute2-2.6.33/tc/tc_util.c
|
|
===================================================================
|
|
--- iproute2-2.6.33.orig/tc/tc_util.c 2010-02-25 11:56:50.000000000 +0800
|
|
+++ iproute2-2.6.33/tc/tc_util.c 2014-01-07 11:06:21.000000000 +0800
|
|
@@ -517,6 +517,10 @@
|
|
memcpy(&re, RTA_DATA(tbs[TCA_STATS_RATE_EST]), MIN(RTA_PAYLOAD(tbs[TCA_STATS_RATE_EST]), sizeof(re)));
|
|
fprintf(fp, "\n%srate %s %upps ",
|
|
prefix, sprint_rate(re.bps, b1), re.pps);
|
|
+#if 1 /* ZyXEL QoS, porting from MSTC */
|
|
+ fprintf(fp, "droprate %s ",
|
|
+ sprint_rate(re.dropbps, b1));
|
|
+#endif
|
|
}
|
|
|
|
if (tbs[TCA_STATS_QUEUE]) {
|
|
@@ -563,6 +567,9 @@
|
|
if (st.pps)
|
|
fprintf(fp, "%upps ", st.pps);
|
|
}
|
|
+#if 1 /* ZyXEL QoS, porting from MSTC */
|
|
+ fprintf(fp, "droprate %s ", sprint_rate(st.dropbps, b1));
|
|
+#endif
|
|
if (st.qlen || st.backlog) {
|
|
fprintf(fp, "backlog ");
|
|
if (st.backlog)
|