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.
#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,
#endif
}
-#endif /* RTE_SCHED_COLLECT_STATS */
-
#ifdef RTE_SCHED_CMAN
static inline int
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;
}
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;
}
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;
}