Commit 24c937b3 authored by Vijay Immanuel's avatar Vijay Immanuel Committed by Jason Gunthorpe
Browse files

IB/rxe: don't clear the tx queue on every transfer



Do not call sk_dst_set() on every packet transfer because
that calls sk_tx_queue_clear(), which clears the tx queue.
A QP must stay on the same tx queue to maintain packet order.

Signed-off-by: default avatarVijay Immanuel <vijayi@attalasystems.com>
Acked-by: default avatarMoni Shoua <monis@mellanox.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
parent 92ebb6a0
Loading
Loading
Loading
Loading
+7 −10
Original line number Diff line number Diff line
@@ -223,6 +223,11 @@ static struct dst_entry *rxe_find_route(struct rxe_dev *rxe,
					rt6_get_cookie((struct rt6_info *)dst);
#endif
		}

		if (dst && (qp_type(qp) == IB_QPT_RC)) {
			dst_hold(dst);
			sk_dst_set(qp->sk->sk, dst);
		}
	}
	rdma_put_gid_attr(attr);
	return dst;
@@ -397,11 +402,7 @@ static int prepare4(struct rxe_dev *rxe, struct rxe_pkt_info *pkt,
	prepare_ipv4_hdr(dst, skb, saddr->s_addr, daddr->s_addr, IPPROTO_UDP,
			 av->grh.traffic_class, av->grh.hop_limit, df, xnet);

	if (qp_type(qp) == IB_QPT_RC)
		sk_dst_set(qp->sk->sk, dst);
	else
	dst_release(dst);

	return 0;
}

@@ -429,11 +430,7 @@ static int prepare6(struct rxe_dev *rxe, struct rxe_pkt_info *pkt,
			 av->grh.traffic_class,
			 av->grh.hop_limit);

	if (qp_type(qp) == IB_QPT_RC)
		sk_dst_set(qp->sk->sk, dst);
	else
	dst_release(dst);

	return 0;
}