Browse Source

fw-api: CL 23191762 - update fw common interface files

HTT stats: report FW CoDel drop, no-drop counters
Define HTT stats TLVs for reporting how many times the FWs CoDel latency-control logic did / didnt choose to drop the head MSDU from a CoDel-enabled MSDU queue following completion of a CoDel latency stats collection window.These drop + no-drop stats are defined per service class and per MSDU queue, though it is expected that the FW will only support per-queue CoDel stats in debug build.

Change-Id: I9cb45834f3429fc7b807bfb031d7bb2cd7f0d5ee
CRs-Fixed: 2262693
spuligil 1 năm trước cách đây
mục cha
commit
e85a958191
2 tập tin đã thay đổi với 102 bổ sung2 xóa
  1. 6 2
      fw/htt.h
  2. 96 0
      fw/htt_stats.h

+ 6 - 2
fw/htt.h

@@ -803,6 +803,8 @@ typedef enum {
     HTT_STATS_MLO_UMAC_SSR_HANDSHAKE_TAG           = 185, /* htt_mlo_umac_htt_handshake_stats_tlv */
     HTT_STATS_MLO_UMAC_SSR_MLO_TAG                 = 186, /* htt_mlo_umac_ssr_mlo_stats_tlv */
     HTT_STATS_PDEV_TDMA_TAG                        = 187, /* htt_pdev_tdma_stats_tlv */
+    HTT_STATS_CODEL_SVC_CLASS_TAG                  = 188, /* htt_codel_svc_class_stats_tlv */
+    HTT_STATS_CODEL_MSDUQ_TAG                      = 189, /* htt_codel_msduq_stats_tlv */
 
 
     HTT_STATS_MAX_TAG,
@@ -10774,7 +10776,7 @@ enum htt_t2h_msg_type {
     HTT_T2H_MSG_TYPE_RX_ADDBA_EXTN                 = 0x31,
     HTT_T2H_MSG_TYPE_RX_DELBA_EXTN                 = 0x32,
     HTT_T2H_MSG_TYPE_RX_CCE_SUPER_RULE_SETUP_DONE  = 0x33,
-    HTT_T2H_CODEL_MSDUQ_LATENCIES_ARRAY_CFG_IND    = 0x34,
+    HTT_T2H_CODEL_MSDUQ_LATENCIES_ARRAY_CFG_IND    = 0x34, /* DEPRECATED */
     HTT_T2H_MSG_TYPE_RX_DATA_IND                   = 0x35,
     HTT_T2H_MSG_TYPE_SOFT_UMAC_TX_COMPL_IND        = 0x36,
     HTT_T2H_MSG_TYPE_PRIMARY_LINK_PEER_MIGRATE_IND = 0x37,
@@ -21075,6 +21077,8 @@ PREPACK struct htt_rx_cce_super_rule_setup_done_t {
         } while (0)
 
 /**
+ * THE BELOW MESSAGE HAS BEEN DEPRECATED
+ *======================================
  * @brief target -> host CoDel MSDU queue latencies array configuration
  *
  * MSG_TYPE => HTT_T2H_CODEL_MSDUQ_LATENCIES_ARRAY_CFG_IND
@@ -21125,7 +21129,7 @@ typedef struct {
              num_elem: 16; /* bits 31:16 */
     A_UINT32 paddr_low;
     A_UINT32 paddr_high;
-} htt_t2h_codel_msduq_latencies_array_cfg_int_t;
+} htt_t2h_codel_msduq_latencies_array_cfg_int_t; /* DEPRECATED */
 
 #define HTT_T2H_CODEL_MSDUQ_LATENCIES_ARRAY_CFG_SIZE 12 /* bytes */
 

+ 96 - 0
fw/htt_stats.h

@@ -546,6 +546,15 @@ enum htt_dbg_ext_stats_type {
      */
     HTT_DBG_PDEV_TDMA_STATS = 57,
 
+    /** HTT_DBG_CODEL_STATS
+     * PARAMS:
+     *    - No Params
+     * RESP MSG:
+     *    - htt_codel_svc_class_stats_tlv
+     *    - htt_codel_msduq_stats_tlv
+     */
+    HTT_DBG_CODEL_STATS = 58,
+
 
     /* keep this last */
     HTT_DBG_NUM_EXT_STATS = 256,
@@ -9550,5 +9559,92 @@ typedef struct {
     htt_umac_ssr_stats_t stats;
 } htt_umac_ssr_stats_tlv;
 
+typedef struct {
+    htt_tlv_hdr_t tlv_hdr;
+    A_UINT32 svc_class_id;
+    /* codel_drops:
+     * How many times have MSDU queues belonging to this service class
+     * dropped their head MSDU due to the queue's latency being above
+     * the CoDel latency limit specified for the service class throughout
+     * the full CoDel latency statistics collection window.
+     */
+    A_UINT32 codel_drops;
+    /* codel_no_drops:
+     * How many times have MSDU queues belonging to this service class
+     * completed a CoDel latency statistics collection window and
+     * concluded that no head MSDU drop is needed, due to the MSDU queue's
+     * latency being under the limit specified for the service class at
+     * some point during the window.
+     */
+    A_UINT32 codel_no_drops;
+} htt_codel_svc_class_stats_tlv;
+
+#define HTT_CODEL_MSDUQ_STATS_TX_FLOW_NUM_M 0x0000FFFF
+#define HTT_CODEL_MSDUQ_STATS_TX_FLOW_NUM_S 0
+
+#define HTT_CODEL_MSDUQ_STATS_TX_FLOW_NUM_GET(_var) \
+    (((_var) & HTT_CODEL_MSDUQ_STATS_TX_FLOW_NUM_M) >> \
+     HTT_CODEL_MSDUQ_STATS_TX_FLOW_NUM_S)
+#define HTT_CODEL_MSDUQ_STATS_TX_FLOW_NUM_SET(_var, _val) \
+    do { \
+        HTT_CHECK_SET_VAL(HTT_CODEL_MSDUQ_STATS_TX_FLOW_NUM, _val); \
+        ((_var) |= ((_val) << HTT_CODEL_MSDUQ_STATS_TX_FLOW_NUM_S)); \
+    } while (0)
+
+#define HTT_CODEL_MSDUQ_STATS_SVC_CLASS_ID_M 0x00FF0000
+#define HTT_CODEL_MSDUQ_STATS_SVC_CLASS_ID_S 16
+
+#define HTT_CODEL_MSDUQ_STATS_SVC_CLASS_ID_GET(_var) \
+    (((_var) & HTT_CODEL_MSDUQ_STATS_SVC_CLASS_ID_M) >> \
+     HTT_CODEL_MSDUQ_STATS_SVC_CLASS_ID_S)
+#define HTT_CODEL_MSDUQ_STATS_SVC_CLASS_ID_SET(_var, _val) \
+    do { \
+        HTT_CHECK_SET_VAL(HTT_CODEL_MSDUQ_STATS_SVC_CLASS_ID, _val); \
+        ((_var) |= ((_val) << HTT_CODEL_MSDUQ_STATS_SVC_CLASS_ID_S)); \
+    } while (0)
+
+#define HTT_CODEL_MSDUQ_STATS_DROPS_M 0x0000FFFF
+#define HTT_CODEL_MSDUQ_STATS_DROPS_S 0
+
+#define HTT_CODEL_MSDUQ_STATS_DROPS_GET(_var) \
+    (((_var) & HTT_CODEL_MSDUQ_STATS_DROPS_M) >> \
+     HTT_CODEL_MSDUQ_STATS_DROPS_S)
+#define HTT_CODEL_MSDUQ_STATS_DROPS_SET(_var, _val) \
+    do { \
+        HTT_CHECK_SET_VAL(HTT_CODEL_MSDUQ_STATS_DROPS, _val); \
+        ((_var) |= ((_val) << HTT_CODEL_MSDUQ_STATS_DROPS_S)); \
+    } while (0)
+
+#define HTT_CODEL_MSDUQ_STATS_NO_DROPS_M 0xFFFF0000
+#define HTT_CODEL_MSDUQ_STATS_NO_DROPS_S 16
+
+#define HTT_CODEL_MSDUQ_STATS_NO_DROPS_GET(_var) \
+    (((_var) & HTT_CODEL_MSDUQ_STATS_NO_DROPS_M) >> \
+     HTT_CODEL_MSDUQ_STATS_NO_DROPS_S)
+#define HTT_CODEL_MSDUQ_STATS_NO_DROPS_SET(_var, _val) \
+    do { \
+        HTT_CHECK_SET_VAL(HTT_CODEL_MSDUQ_STATS_NO_DROPS, _val); \
+        ((_var) |= ((_val) << HTT_CODEL_MSDUQ_STATS_NO_DROPS_S)); \
+    } while (0)
+
+typedef struct {
+    htt_tlv_hdr_t tlv_hdr;
+    union {
+        A_UINT32 id__word;
+        struct {
+            A_UINT32 tx_flow_num: 16, /* FW's MSDU queue ID */
+                     svc_class_id: 8,
+                     reserved: 8;
+        };
+    };
+    union {
+        A_UINT32 stats__word;
+        struct {
+            A_UINT32
+                codel_drops: 16,
+                codel_no_drops: 16;
+        };
+    };
+} htt_codel_msduq_stats_tlv;
 
 #endif /* __HTT_STATS_H__ */