RDMA/siw: Call llist_reverse_order in siw_run_sq
authorGuoqing Jiang <guoqing.jiang@linux.dev>
Mon, 21 Aug 2023 13:32:55 +0000 (21:32 +0800)
committerLeon Romanovsky <leon@kernel.org>
Tue, 22 Aug 2023 14:05:12 +0000 (17:05 +0300)
We can call the function to get fifo list.

Signed-off-by: Guoqing Jiang <guoqing.jiang@linux.dev>
Link: https://lore.kernel.org/r/20230821133255.31111-4-guoqing.jiang@linux.dev
Acked-by: Bernard Metzler <bmt@zurich.ibm.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
drivers/infiniband/sw/siw/siw_qp_tx.c

index 3ff339eceec31a09c1f3f5e4f41960f8fd95b995..60b6a413596118a2d4011b8dee55be90566df8e8 100644 (file)
@@ -1271,13 +1271,7 @@ int siw_run_sq(void *data)
                 * llist_del_all returns a list with newest entry first.
                 * Re-order list for fairness among QP's.
                 */
-               while (active) {
-                       struct llist_node *tmp = active;
-
-                       active = llist_next(active);
-                       tmp->next = fifo_list;
-                       fifo_list = tmp;
-               }
+               fifo_list = llist_reverse_order(active);
                while (fifo_list) {
                        qp = container_of(fifo_list, struct siw_qp, tx_list);
                        fifo_list = llist_next(fifo_list);