Lines Matching refs:qp_num
1152 if (ret || qp_id >= qm->qp_num) {
1153 dev_err(dev, "Please input qp num (0-%d)", qm->qp_num - 1);
1198 if (ret || qp_id >= qm->qp_num) {
1199 dev_err(dev, "Please input qp num (0-%d)", qm->qp_num - 1);
1266 unsigned int qp_num = qm->qp_num;
1277 if (ret || *q_id >= qp_num) {
1278 dev_err(dev, "Please input qp num (0-%d)", qp_num - 1);
1663 if (qm->qp_in_used == qm->qp_num) {
1665 qm->qp_num);
1670 qp_id = idr_alloc_cyclic(&qm->qp_idr, NULL, 0, qm->qp_num, GFP_ATOMIC);
1673 qm->qp_num);
2235 qm->qp_in_used = qm->qp_num;
2305 ret = qm->qp_num - qm->qp_in_used;
2364 QMC_ALIGN(sizeof(struct qm_sqc) * qm->qp_num) +
2365 QMC_ALIGN(sizeof(struct qm_cqc) * qm->qp_num);
2374 QM_INIT_BUF(qm, sqc, qm->qp_num);
2375 QM_INIT_BUF(qm, cqc, qm->qp_num);
2377 qm->qp_array = kcalloc(qm->qp_num, sizeof(struct hisi_qp), GFP_KERNEL);
2387 for (i = 0; i < qm->qp_num; i++) {
2442 hisi_qp_memory_uninit(qm, qm->qp_num);
2582 ret = hisi_qm_set_vft(qm, 0, qm->qp_base, qm->qp_num);
2623 dev_dbg(dev, "qm start with %d queue pairs\n", qm->qp_num);
2625 if (!qm->qp_num) {
2626 dev_err(dev, "qp_num should not be 0\n");
2652 for (i = 0; i < qm->qp_num; i++) {
2678 for (i = 0; i < qm->qp_num; i++) {
2702 for (i = 0; i < qm->qp_num; i++) {
2956 * @qp_num: The num of queue pairs.
2958 void hisi_qm_free_qps(struct hisi_qp **qps, int qp_num)
2962 if (!qps || qp_num <= 0)
2965 for (i = qp_num - 1; i >= 0; i--)
3020 * @qp_num: The number of queue pairs need created.
3029 int hisi_qm_alloc_qps_node(struct hisi_qm_list *qm_list, int qp_num,
3037 if (!qps || !qm_list || qp_num <= 0)
3047 for (i = 0; i < qp_num; i++) {
3055 if (i == qp_num) {
3064 node, alg_type, qp_num);
3075 u32 q_base = qm->qp_num;
3081 remain_q_num = qm->ctrl_qp_num - qm->qp_num;
3084 if (qm->ctrl_qp_num < qm->qp_num || remain_q_num < num_vfs)
4056 ret = hisi_qm_get_vft(qm, &qm->qp_base, &qm->qp_num);