| 664 | } |
| 665 | |
| 666 | static int |
| 667 | cn9k_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 | |
| 699 | static int |
| 700 | cn9k_ree_rule_db_update(struct rte_regexdev *dev, |
nothing calls this directly
no test coverage detected