diff options
author | Dave Jiang <dave.jiang@intel.com> | 2023-08-22 09:05:02 -0700 |
---|---|---|
committer | Jon Mason <jdmason@kudzu.us> | 2023-08-22 12:38:19 -0400 |
commit | 643982232860887fed493144957ea5794b6557d1 (patch) | |
tree | cf1d163baad1e20518161ab258d0d6759097eeeb | |
parent | 5a7693e6bbf19b22fd6c1d2c4b7beb0a03969e2c (diff) | |
download | lwn-643982232860887fed493144957ea5794b6557d1.tar.gz lwn-643982232860887fed493144957ea5794b6557d1.zip |
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>
-rw-r--r-- | drivers/ntb/ntb_transport.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/ntb/ntb_transport.c b/drivers/ntb/ntb_transport.c index 9532108d2dce..f9e7847a378e 100644 --- a/drivers/ntb/ntb_transport.c +++ b/drivers/ntb/ntb_transport.c @@ -1901,7 +1901,7 @@ err: 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; } |