[qca-nss-drv] Clean up CoDel related statistics.
Move statistics that are unique to CoDel out of the common shaper
node statistics.
Change-Id: I01df1b142a46bb6f3c1dc8a22156cd5fb6d2a027
Signed-off-by: Sakthi Vignesh Radhakrishnan <sradhakr@codeaurora.org>
diff --git a/exports/nss_shaper.h b/exports/nss_shaper.h
index e919284..196fa3a 100644
--- a/exports/nss_shaper.h
+++ b/exports/nss_shaper.h
@@ -565,6 +565,42 @@
};
/**
+ * nss_shaper_node_codel_fq_stats
+ * CoDel flow queue mode statistics.
+ *
+ * TODO: Add FQ CoDel statistics.
+ */
+struct nss_shaper_node_codel_fq_stats {
+};
+
+/**
+ * nss_shaper_node_codel_sq_stats
+ * CoDel single queue mode statistics.
+ */
+struct nss_shaper_node_codel_sq_stats {
+ /**
+ * Maximum amount of time (in milliseconds) that a packet was in this shaper
+ * node before being dequeued.
+ */
+ uint32_t packet_latency_peak_msec_dequeued;
+
+ /**
+ * Maximum amount of time (in milliseconds) that a packet was in this shaper
+ * node before being dropped.
+ */
+ uint32_t packet_latency_peak_msec_dropped;
+};
+
+/**
+ * nss_shaper_node_codel_stats
+ * CoDel shaper node statistics.
+ */
+struct nss_shaper_node_codel_stats {
+ struct nss_shaper_node_codel_sq_stats sq; /**< Single queue mode statistics. */
+ struct nss_shaper_node_codel_fq_stats fq; /**< Flow queue mode statistics. */
+};
+
+/**
* nss_shaper_node_stats_delta
* Statistics that are sent as deltas.
*/
@@ -612,37 +648,11 @@
* Common shaper node statistics.
*/
struct nss_shaper_node_stats {
- uint32_t qlen_bytes;
- /**< Total size of packets waiting in the queue. */
- uint32_t qlen_packets;
- /**< Number of packets waiting in the queue. */
-
- /**
- * Maximum amount of time (in milliseconds) that a packet was in this shaper
- * node before being dequeued.
- */
- uint32_t packet_latency_peak_msec_dequeued;
-
- /**
- * Minimum amount of time (in milliseconds) that a packet was in this shaper
- * node before being dequeued.
- */
- uint32_t packet_latency_minimum_msec_dequeued;
-
- /**
- * Maximum amount of time (in milliseconds) that a packet was in this shaper
- * node before being dropped.
- */
- uint32_t packet_latency_peak_msec_dropped;
-
- /**
- * Minimum amount of time (in milliseconds) that a packet was in this shaper
- * node before being dropped.
- */
- uint32_t packet_latency_minimum_msec_dropped;
-
+ uint32_t qlen_bytes; /**< Total size of packets waiting in the queue. */
+ uint32_t qlen_packets; /**< Number of packets waiting in the queue. */
+ uint32_t unused[4]; /**< Reserved for future statistics expansion. */
struct nss_shaper_node_stats_delta delta;
- /**< Statistics that are sent as deltas. */
+ /**< Statistics that are sent as deltas. */
};
/**
@@ -657,6 +667,8 @@
* to add their statistics structure here.
*/
union {
+ struct nss_shaper_node_codel_stats codel;
+ /**< CoDel specific statistics. */
} per_sn_stats; /**< Shaper specific statistics. */
};