Commit 64398223 authored by Dave Jiang's avatar Dave Jiang Committed by Jon Mason
Browse files

ntb: Check tx descriptors outstanding instead of head/tail for tx queue



Use existing function ntb_transport_tx_free_entry() instead of open coding
the check to see if there are outstanding tx descriptors.

Reviewed-by: default avatarLogan Gunthorpe <logang@deltatee.com>
Signed-off-by: default avatarDave Jiang <dave.jiang@intel.com>
Signed-off-by: default avatarJon Mason <jdmason@kudzu.us>
parent 5a7693e6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1901,7 +1901,7 @@ static void ntb_async_tx(struct ntb_transport_qp *qp,
static int ntb_process_tx(struct ntb_transport_qp *qp,
			  struct ntb_queue_entry *entry)
{
	if (qp->tx_index == qp->remote_rx_info->entry) {
	if (!ntb_transport_tx_free_entry(qp)) {
		qp->tx_ring_full++;
		return -EAGAIN;
	}