MCPcopy Create free account
hub / github.com/F-Stack/f-stack / grinder_handle

Function grinder_handle

dpdk/lib/sched/rte_sched.c:2810–2911  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2808}
2809
2810static inline uint32_t
2811grinder_handle(struct rte_sched_port *port,
2812 struct rte_sched_subport *subport, uint32_t pos)
2813{
2814 struct rte_sched_grinder *grinder = subport->grinder + pos;
2815
2816 switch (grinder->state) {
2817 case e_GRINDER_PREFETCH_PIPE:
2818 {
2819 if (grinder_next_pipe(port, subport, pos)) {
2820 grinder_prefetch_pipe(subport, pos);
2821 subport->busy_grinders++;
2822
2823 grinder->state = e_GRINDER_PREFETCH_TC_QUEUE_ARRAYS;
2824 return 0;
2825 }
2826
2827 return 0;
2828 }
2829
2830 case e_GRINDER_PREFETCH_TC_QUEUE_ARRAYS:
2831 {
2832 struct rte_sched_pipe *pipe = grinder->pipe;
2833
2834 grinder->pipe_params = subport->pipe_profiles + pipe->profile;
2835 grinder->subport_params = port->subport_profiles +
2836 subport->profile;
2837
2838 grinder_prefetch_tc_queue_arrays(subport, pos);
2839
2840 if (subport->tc_ov_enabled)
2841 grinder_credits_update_with_tc_ov(port, subport, pos);
2842 else
2843 grinder_credits_update(port, subport, pos);
2844
2845 grinder->state = e_GRINDER_PREFETCH_MBUF;
2846 return 0;
2847 }
2848
2849 case e_GRINDER_PREFETCH_MBUF:
2850 {
2851 grinder_prefetch_mbuf(subport, pos);
2852
2853 grinder->state = e_GRINDER_READ_MBUF;
2854 return 0;
2855 }
2856
2857 case e_GRINDER_READ_MBUF:
2858 {
2859 uint32_t wrr_active, result = 0;
2860
2861 result = grinder_schedule(port, subport, pos);
2862
2863 wrr_active = (grinder->tc_index == RTE_SCHED_TRAFFIC_CLASS_BE);
2864
2865 /* Look for next packet within the same TC */
2866 if (result && grinder->qmask) {
2867 if (wrr_active)

Callers 1

rte_sched_port_dequeueFunction · 0.85

Calls 10

grinder_next_pipeFunction · 0.85
grinder_prefetch_pipeFunction · 0.85
grinder_credits_updateFunction · 0.85
grinder_prefetch_mbufFunction · 0.85
grinder_scheduleFunction · 0.85
grinder_wrrFunction · 0.85
grinder_wrr_storeFunction · 0.85
grinder_next_tcFunction · 0.85

Tested by

no test coverage detected