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

Function mlx5_regexdev_enqueue

dpdk/drivers/regex/mlx5/mlx5_regex_fastpath.c:445–480  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

443#endif
444
445uint16_t
446mlx5_regexdev_enqueue(struct rte_regexdev *dev, uint16_t qp_id,
447 struct rte_regex_ops **ops, uint16_t nb_ops)
448{
449 struct mlx5_regex_priv *priv = dev->data->dev_private;
450 struct mlx5_regex_qp *queue = &priv->qps[qp_id];
451 struct mlx5_regex_hw_qp *qp_obj;
452 size_t hw_qpid, job_id, i = 0;
453
454#ifdef MLX5_REGEX_DEBUG
455 if (validate_ops(ops, nb_ops))
456 return 0;
457#endif
458
459 while ((hw_qpid = ffsll(queue->free_qps))) {
460 hw_qpid--; /* ffs returns 1 for bit 0 */
461 qp_obj = &queue->qps[hw_qpid];
462 while (get_free(qp_obj, priv->has_umr)) {
463 job_id = job_id_get(hw_qpid, qp_size_get(qp_obj),
464 qp_obj->pi);
465 prep_one(priv, queue, qp_obj, ops[i],
466 &queue->jobs[job_id]);
467 i++;
468 if (unlikely(i == nb_ops)) {
469 send_doorbell(priv, qp_obj);
470 goto out;
471 }
472 }
473 queue->free_qps &= ~(1ULL << hw_qpid);
474 send_doorbell(priv, qp_obj);
475 }
476
477out:
478 queue->pi += i;
479 return i;
480}
481
482#define MLX5_REGEX_RESP_SZ 8
483

Callers

nothing calls this directly

Calls 7

validate_opsFunction · 0.85
get_freeFunction · 0.85
job_id_getFunction · 0.85
qp_size_getFunction · 0.85
prep_oneFunction · 0.85
send_doorbellFunction · 0.85
ffsllFunction · 0.50

Tested by

no test coverage detected