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

Function cn9k_ree_queue_pair_setup

dpdk/drivers/regex/cn9k/cn9k_regexdev.c:666–697  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

664}
665
666static int
667cn9k_ree_queue_pair_setup(struct rte_regexdev *dev, uint16_t qp_id,
668 const struct rte_regexdev_qp_conf *qp_conf)
669{
670 struct cn9k_ree_data *data = dev->data->dev_private;
671 struct roc_ree_qp *qp;
672
673 ree_func_trace("Queue=%d", qp_id);
674
675 if (data->queue_pairs[qp_id] != NULL)
676 ree_queue_pair_release(dev, qp_id);
677
678 if (qp_conf->nb_desc > REE_DEFAULT_CMD_QLEN) {
679 cn9k_err("Could not setup queue pair for %u descriptors",
680 qp_conf->nb_desc);
681 return -EINVAL;
682 }
683 if (qp_conf->qp_conf_flags != 0) {
684 cn9k_err("Could not setup queue pair with configuration flags 0x%x",
685 qp_conf->qp_conf_flags);
686 return -EINVAL;
687 }
688
689 qp = ree_qp_create(dev, qp_id);
690 if (qp == NULL) {
691 cn9k_err("Could not create queue pair %d", qp_id);
692 return -ENOMEM;
693 }
694 data->queue_pairs[qp_id] = qp;
695
696 return 0;
697}
698
699static int
700cn9k_ree_rule_db_update(struct rte_regexdev *dev,

Callers

nothing calls this directly

Calls 2

ree_queue_pair_releaseFunction · 0.85
ree_qp_createFunction · 0.85

Tested by

no test coverage detected