diff options
author | Dave Jiang <dave.jiang@intel.com> | 2023-08-22 09:04:57 -0700 |
---|---|---|
committer | Jon Mason <jdmason@kudzu.us> | 2023-08-22 12:38:19 -0400 |
commit | 5a7693e6bbf19b22fd6c1d2c4b7beb0a03969e2c (patch) | |
tree | 65c59838f0fbef539e46bd43bb6a4ae8178fd513 /lib/crypto/mpi/mpi-mod.c | |
parent | f195a1a6fe416882984f8bd6c61afc1383171860 (diff) |
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: e74bfeedad08 ("NTB: Add flow control to the ntb_netdev")
Reviewed-by: Logan Gunthorpe <logang@deltatee.com>
Signed-off-by: renlonglong <ren.longlong@h3c.com>
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Jon Mason <jdmason@kudzu.us>
Diffstat (limited to 'lib/crypto/mpi/mpi-mod.c')
0 files changed, 0 insertions, 0 deletions