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

Function mlx5_regexdev_enqueue_gga

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

Source from the content-addressed store, hash-verified

404}
405
406uint16_t
407mlx5_regexdev_enqueue_gga(struct rte_regexdev *dev, uint16_t qp_id,
408 struct rte_regex_ops **ops, uint16_t nb_ops)
409{
410 struct mlx5_regex_priv *priv = dev->data->dev_private;
411 struct mlx5_regex_qp *queue = &priv->qps[qp_id];
412 struct mlx5_regex_hw_qp *qp_obj;
413 size_t hw_qpid, nb_left = nb_ops, nb_desc;
414
415#ifdef MLX5_REGEX_DEBUG
416 if (validate_ops(ops, nb_ops))
417 return 0;
418#endif
419
420 while ((hw_qpid = ffsll(queue->free_qps))) {
421 hw_qpid--; /* ffs returns 1 for bit 0 */
422 qp_obj = &queue->qps[hw_qpid];
423 nb_desc = get_free(qp_obj, priv->has_umr);
424 if (nb_desc) {
425 /* The ops be handled can't exceed nb_ops. */
426 if (nb_desc > nb_left)
427 nb_desc = nb_left;
428 else
429 queue->free_qps &= ~(1ULL << hw_qpid);
430 prep_regex_umr_wqe_set(priv, queue, qp_obj, ops,
431 nb_desc);
432 send_doorbell(priv, qp_obj);
433 nb_left -= nb_desc;
434 }
435 if (!nb_left)
436 break;
437 ops += nb_desc;
438 }
439 nb_ops -= nb_left;
440 queue->pi += nb_ops;
441 return nb_ops;
442}
443#endif
444
445uint16_t

Callers

nothing calls this directly

Calls 5

validate_opsFunction · 0.85
get_freeFunction · 0.85
prep_regex_umr_wqe_setFunction · 0.85
send_doorbellFunction · 0.85
ffsllFunction · 0.50

Tested by

no test coverage detected