diff options
author | Dave Jiang <dave.jiang@intel.com> | 2023-08-22 19:05:02 +0300 |
---|---|---|
committer | Jon Mason <jdmason@kudzu.us> | 2023-08-22 19:38:19 +0300 |
commit | 643982232860887fed493144957ea5794b6557d1 (patch) | |
tree | cf1d163baad1e20518161ab258d0d6759097eeeb | |
parent | 5a7693e6bbf19b22fd6c1d2c4b7beb0a03969e2c (diff) | |
download | linux-643982232860887fed493144957ea5794b6557d1.tar.xz |
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; } |