Skip to content
Commit 5a7693e6 authored by Dave Jiang's avatar Dave Jiang Committed by Jon Mason
Browse files

ntb: Fix calculation ntb_transport_tx_free_entry()

ntb_transport_tx_free_entry() never returns 0 with the current
calculation. If head == tail, then it would return qp->tx_max_entry.
Change compare to tail >= head and when they are equal, a 0 would be
returned.

Fixes: e74bfeed

 ("NTB: Add flow control to the ntb_netdev")
Reviewed-by: default avatarLogan Gunthorpe <logang@deltatee.com>
Signed-off-by: default avatarrenlonglong <ren.longlong@h3c.com>
Signed-off-by: default avatarDave Jiang <dave.jiang@intel.com>
Signed-off-by: default avatarJon Mason <jdmason@kudzu.us>
parent f195a1a6
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment