- struct mlx5_regex_sq *sq;
- size_t sqid, job_id, i = 0;
-
- while ((sqid = ffs(queue->free_sqs))) {
- sqid--; /* ffs returns 1 for bit 0 */
- sq = &queue->sqs[sqid];
- while (get_free(sq, priv->has_umr)) {
- job_id = job_id_get(sqid, sq_size_get(sq), sq->pi);
- prep_one(priv, queue, sq, ops[i], &queue->jobs[job_id]);
+ struct mlx5_regex_hw_qp *qp_obj;
+ size_t hw_qpid, job_id, i = 0;
+
+ while ((hw_qpid = ffs(queue->free_qps))) {
+ hw_qpid--; /* ffs returns 1 for bit 0 */
+ qp_obj = &queue->qps[hw_qpid];
+ while (get_free(qp_obj, priv->has_umr)) {
+ job_id = job_id_get(hw_qpid, qp_size_get(qp_obj),
+ qp_obj->pi);
+ prep_one(priv, queue, qp_obj, ops[i],
+ &queue->jobs[job_id]);