mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-03 19:55:31 +00:00
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>
This commit is contained in:
parent
5a7693e6bb
commit
6439822328
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user