[v3,5/8] NTB: perf: Don't require one more memory window than number of peers
diff mbox series

Message ID 20190109192233.5752-6-logang@deltatee.com
State In Next
Commit 923897b8eb43d756a75712155168ab35128a8b3f
Headers show
  • Fix breakage caused by the NTB multi-port patchset
Related show

Commit Message

Logan Gunthorpe Jan. 9, 2019, 7:22 p.m. UTC
ntb_perf should not require more than one memory window per peer. This
was probably an off-by-one error.

Fixes: 5648e56d03fa ("NTB: ntb_perf: Add full multi-port NTB API support")
Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
Acked-by: Allen Hubbe <allenbh@gmail.com>
Tested-by: Alexander Fomichev <fomichev.ru@gmail.com>
 drivers/ntb/test/ntb_perf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff mbox series

diff --git a/drivers/ntb/test/ntb_perf.c b/drivers/ntb/test/ntb_perf.c
index 9174085ddc13..bd0474e62a40 100644
--- a/drivers/ntb/test/ntb_perf.c
+++ b/drivers/ntb/test/ntb_perf.c
@@ -655,7 +655,7 @@  static int perf_init_service(struct perf_ctx *perf)
 	u64 mask;
-	if (ntb_peer_mw_count(perf->ntb) < perf->pcnt + 1) {
+	if (ntb_peer_mw_count(perf->ntb) < perf->pcnt) {
 		dev_err(&perf->ntb->dev, "Not enough memory windows\n");
 		return -EINVAL;