[qca-nss-drv] Clean up shaper statistics.
The change cleans up shaper statistics related structure and field names.
Also, it adds some reserved fields for future use.
Change-Id: I13b4c815d0a3180c0b973bc27d84a8eba14104f1
Signed-off-by: Sakthi Vignesh Radhakrishnan <sradhakr@codeaurora.org>
diff --git a/exports/nss_shaper.h b/exports/nss_shaper.h
index e543069..e919284 100644
--- a/exports/nss_shaper.h
+++ b/exports/nss_shaper.h
@@ -565,10 +565,10 @@
};
/**
- * nss_shaper_node_basic_statistics_delta
+ * nss_shaper_node_stats_delta
* Statistics that are sent as deltas.
*/
-struct nss_shaper_node_basic_statistics_delta {
+struct nss_shaper_node_stats_delta {
uint32_t enqueued_bytes; /**< Bytes enqueued successfully. */
uint32_t enqueued_packets; /**< Packets enqueued successfully. */
@@ -603,22 +603,15 @@
* Number of times any queue limit was overrun, leading to packet drops.
*/
uint32_t queue_overrun;
+
+ uint32_t unused[4]; /**< Reserved for future statistics expansion. */
};
/**
- * nss_shaper_shaper_node_basic_stats_get
- * Basic statistics for a shaper node.
+ * nss_shaper_node_stats
+ * Common shaper node statistics.
*/
-struct nss_shaper_shaper_node_basic_stats_get {
-
- /*
- * Request
- */
- uint32_t qos_tag; /**< QoS tag of the shaper node. */
-
- /*
- * Response
- */
+struct nss_shaper_node_stats {
uint32_t qlen_bytes;
/**< Total size of packets waiting in the queue. */
uint32_t qlen_packets;
@@ -648,11 +641,44 @@
*/
uint32_t packet_latency_minimum_msec_dropped;
- struct nss_shaper_node_basic_statistics_delta delta;
+ struct nss_shaper_node_stats_delta delta;
/**< Statistics that are sent as deltas. */
};
/**
+ * nss_shaper_node_stats_response
+ * Statistics response for shaper nodes.
+ */
+struct nss_shaper_node_stats_response {
+ struct nss_shaper_node_stats sn_stats; /**< Common shaper node statistics. */
+
+ /**
+ * All shaper nodes that need to maintain unique statistics need
+ * to add their statistics structure here.
+ */
+ union {
+ } per_sn_stats; /**< Shaper specific statistics. */
+};
+
+/**
+ * nss_shaper_node_stats_get
+ * Statistics of a shaper node.
+ */
+struct nss_shaper_node_stats_get {
+
+ /*
+ * Request
+ */
+ uint32_t qos_tag; /**< QoS tag of the shaper node. */
+
+ /*
+ * Response
+ */
+ struct nss_shaper_node_stats_response response;
+ /**< Shaper node statistics response */
+};
+
+/**
* nss_shaper_configure
* Configuration message for a shaper node.
*/
@@ -676,8 +702,8 @@
/**< Set a shaper to operate in Hybrid mode. */
struct nss_shaper_node_config shaper_node_config;
/**< Configuration message for any type of shaper node. */
- struct nss_shaper_shaper_node_basic_stats_get shaper_node_basic_stats_get;
- /**< Basic statistics for a shaper node. */
+ struct nss_shaper_node_stats_get shaper_node_stats_get;
+ /**< Statistics for a shaper node. */
} msg; /**< Types of configuration messages. */
};