[qca-edma] Add support for interframe delay stats
Add support to display interframe delay for upto 8 flows
each for video traffic.
Change-Id: I9cb3d793442fe4b9150108cf29259b0a4b23ad31
Signed-off-by: Rakesh Nair <ranair@codeaurora.org>
diff --git a/edma.c b/edma.c
index c67be79..30644a8 100644
--- a/edma.c
+++ b/edma.c
@@ -24,6 +24,7 @@
u16 edma_ath_eth_type;
extern u8 edma_dscp2ac_tbl[EDMA_PRECEDENCE_MAX];
extern u8 edma_per_prec_stats_enable;
+extern u32 edma_iad_stats_enable;
/* edma_skb_priority_offset()
* get edma skb priority
@@ -804,6 +805,11 @@
if (edma_per_prec_stats_enable) {
edma_cinfo->edma_ethstats.rx_prec[priority]++;
edma_cinfo->edma_ethstats.rx_ac[edma_dscp2ac_tbl[priority]]++;
+
+ if (edma_iad_stats_enable) {
+ if (edma_dscp2ac_tbl[priority] == EDMA_AC_VI)
+ edma_iad_process_flow(edma_cinfo, skb, EDMA_INGRESS_DIR, priority);
+ }
}
/* At this point skb should go to stack */
@@ -1486,6 +1492,12 @@
edma_cinfo->edma_ethstats.tx_ac[edma_dscp2ac_tbl[precedence]]++;
tpd->word3 |= precedence << EDMA_TPD_PRIO_SHIFT;
}
+
+ /* If sysctl support for IAD stats are enabled */
+ if (edma_iad_stats_enable) {
+ if (edma_dscp2ac_tbl[precedence] == EDMA_AC_VI)
+ edma_iad_process_flow(edma_cinfo, skb, EDMA_EGRESS_DIR, precedence);
+ }
}
/* If tpd or sw_desc is still unitiialized then we need to return */