Skip to content

Commit 6439822

Browse files
davejiangjonmason
authored andcommitted
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: Logan Gunthorpe <logang@deltatee.com> Signed-off-by: Dave Jiang <dave.jiang@intel.com> Signed-off-by: Jon Mason <jdmason@kudzu.us>
1 parent 5a7693e commit 6439822

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/ntb/ntb_transport.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1901,7 +1901,7 @@ static void ntb_async_tx(struct ntb_transport_qp *qp,
19011901
static int ntb_process_tx(struct ntb_transport_qp *qp,
19021902
struct ntb_queue_entry *entry)
19031903
{
1904-
if (qp->tx_index == qp->remote_rx_info->entry) {
1904+
if (!ntb_transport_tx_free_entry(qp)) {
19051905
qp->tx_ring_full++;
19061906
return -EAGAIN;
19071907
}

0 commit comments

Comments
 (0)