]> git.droids-corp.org - dpdk.git/commitdiff
sched: enable statistics unconditionally
authorMegha Ajmera <megha.ajmera@intel.com>
Tue, 22 Feb 2022 12:57:44 +0000 (12:57 +0000)
committerThomas Monjalon <thomas@monjalon.net>
Thu, 24 Feb 2022 22:44:18 +0000 (23:44 +0100)
Removed RTE_SCHED_COLLECT_STATS flag from rte_config.h.
Stats collection is always enabled.

Signed-off-by: Megha Ajmera <megha.ajmera@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
config/rte_config.h
doc/guides/sample_app_ug/qos_scheduler.rst
lib/sched/rte_sched.c

index d449af48109861859b294c62a36b256861c7ff1a..de6fea5b67879cb4dfcd15e0f1bddfe4a846a3da 100644 (file)
@@ -90,7 +90,6 @@
 
 /* rte_sched defines */
 #undef RTE_SCHED_CMAN
-#undef RTE_SCHED_COLLECT_STATS
 #undef RTE_SCHED_SUBPORT_TC_OV
 
 /* rte_graph defines */
index b043022622723299cf992d69a70df36569737dd3..f376554dd9dfc3eba79ee0d951c815dbabd3b0c6 100644 (file)
@@ -39,12 +39,6 @@ The application is located in the ``qos_sched`` sub-directory.
 
         This application is intended as a linux only.
 
-.. note::
-
-    To get statistics on the sample app using the command line interface as described in the next section,
-    DPDK must be compiled defining *RTE_SCHED_COLLECT_STATS*, which can be done by changing the relevant
-    entry in the ``config/rte_config.h`` file.
-
 .. note::
 
     Number of grinders is currently set to 8.
index 0f9bd45784eaa89d07cb942dd528fb4b8290e5f3..7298df9e90193f00fbbe594d2984ff6bcdc7ff4b 100644 (file)
@@ -1778,8 +1778,6 @@ rte_sched_port_queue_is_empty(struct rte_sched_subport *subport,
 
 #endif /* RTE_SCHED_DEBUG */
 
-#ifdef RTE_SCHED_COLLECT_STATS
-
 static inline void
 rte_sched_port_update_subport_stats(struct rte_sched_port *port,
        struct rte_sched_subport *subport,
@@ -1837,8 +1835,6 @@ rte_sched_port_update_queue_stats_on_drop(struct rte_sched_subport *subport,
 #endif
 }
 
-#endif /* RTE_SCHED_COLLECT_STATS */
-
 #ifdef RTE_SCHED_CMAN
 
 static inline int
@@ -1977,18 +1973,14 @@ rte_sched_port_enqueue_qptrs_prefetch0(struct rte_sched_subport *subport,
        struct rte_mbuf *pkt, uint32_t subport_qmask)
 {
        struct rte_sched_queue *q;
-#ifdef RTE_SCHED_COLLECT_STATS
        struct rte_sched_queue_extra *qe;
-#endif
        uint32_t qindex = rte_mbuf_sched_queue_get(pkt);
        uint32_t subport_queue_id = subport_qmask & qindex;
 
        q = subport->queue + subport_queue_id;
        rte_prefetch0(q);
-#ifdef RTE_SCHED_COLLECT_STATS
        qe = subport->queue_extra + subport_queue_id;
        rte_prefetch0(qe);
-#endif
 
        return subport_queue_id;
 }
@@ -2030,12 +2022,10 @@ rte_sched_port_enqueue_qwa(struct rte_sched_port *port,
        if (unlikely(rte_sched_port_cman_drop(port, subport, pkt, qindex, qlen) ||
                     (qlen >= qsize))) {
                rte_pktmbuf_free(pkt);
-#ifdef RTE_SCHED_COLLECT_STATS
                rte_sched_port_update_subport_stats_on_drop(port, subport,
                        qindex, pkt, qlen < qsize);
                rte_sched_port_update_queue_stats_on_drop(subport, qindex, pkt,
                        qlen < qsize);
-#endif
                return 0;
        }
 
@@ -2047,10 +2037,8 @@ rte_sched_port_enqueue_qwa(struct rte_sched_port *port,
        rte_bitmap_set(subport->bmp, qindex);
 
        /* Statistics */
-#ifdef RTE_SCHED_COLLECT_STATS
        rte_sched_port_update_subport_stats(port, subport, qindex, pkt);
        rte_sched_port_update_queue_stats(subport, qindex, pkt);
-#endif
 
        return 1;
 }