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

Function dlb2_process_dequeue_qes

dpdk/drivers/event/dlb2/dlb2.c:3356–3412  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3354}
3355
3356static __rte_noinline int
3357dlb2_process_dequeue_qes(struct dlb2_eventdev_port *ev_port,
3358 struct dlb2_port *qm_port,
3359 struct rte_event *events,
3360 struct dlb2_dequeue_qe *qes,
3361 int cnt)
3362{
3363 uint8_t *qid_mappings = qm_port->qid_mappings;
3364 int i, num, evq_id;
3365
3366 for (i = 0, num = 0; i < cnt; i++) {
3367 struct dlb2_dequeue_qe *qe = &qes[i];
3368 int sched_type_map[DLB2_NUM_HW_SCHED_TYPES] = {
3369 [DLB2_SCHED_ATOMIC] = RTE_SCHED_TYPE_ATOMIC,
3370 [DLB2_SCHED_UNORDERED] = RTE_SCHED_TYPE_PARALLEL,
3371 [DLB2_SCHED_ORDERED] = RTE_SCHED_TYPE_ORDERED,
3372 [DLB2_SCHED_DIRECTED] = RTE_SCHED_TYPE_ATOMIC,
3373 };
3374
3375 /* Fill in event information.
3376 * Note that flow_id must be embedded in the data by
3377 * the app, such as the mbuf RSS hash field if the data
3378 * buffer is a mbuf.
3379 */
3380 if (unlikely(qe->error)) {
3381 DLB2_LOG_ERR("QE error bit ON");
3382 DLB2_INC_STAT(ev_port->stats.traffic.rx_drop, 1);
3383 dlb2_consume_qe_immediate(qm_port, 1);
3384 continue; /* Ignore */
3385 }
3386
3387 events[num].u64 = qe->data;
3388 events[num].flow_id = qe->flow_id;
3389 events[num].priority = DLB2_TO_EV_PRIO((uint8_t)qe->priority);
3390 events[num].event_type = qe->u.event_type.major;
3391 events[num].sub_event_type = qe->u.event_type.sub;
3392 events[num].sched_type = sched_type_map[qe->sched_type];
3393 events[num].impl_opaque = qe->qid_depth;
3394
3395 /* qid not preserved for directed queues */
3396 if (qm_port->is_directed)
3397 evq_id = ev_port->link[0].queue_id;
3398 else
3399 evq_id = qid_mappings[qe->qid];
3400
3401 events[num].queue_id = evq_id;
3402 DLB2_INC_STAT(
3403 ev_port->stats.queue[evq_id].qid_depth[qe->qid_depth],
3404 1);
3405 DLB2_INC_STAT(ev_port->stats.rx_sched_cnt[qe->sched_type], 1);
3406 num++;
3407 }
3408
3409 DLB2_INC_STAT(ev_port->stats.traffic.rx_ok, num);
3410
3411 return num;
3412}
3413

Callers 3

dlb2_hw_dequeue_sparseFunction · 0.85
dlb2_hw_dequeueFunction · 0.85

Calls 1

Tested by

no test coverage detected