Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3152730imm; Fri, 20 Jul 2018 11:02:41 -0700 (PDT) X-Google-Smtp-Source: AAOMgpevYt02Kmpeqteb5DTwYZGNfodxg0YPgraV8Btc8hyNRaawqa0/xoS0KYXlfibuR8bS5v4t X-Received: by 2002:a62:1815:: with SMTP id 21-v6mr3173604pfy.227.1532109761436; Fri, 20 Jul 2018 11:02:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532109761; cv=none; d=google.com; s=arc-20160816; b=0ADSSEXmp7ref++RZsjWEXV3loAF5z2fr6IYQOUlxFKGVs93XffJCKNEBUm9c48BvT S176211dWYACg0zME/5Y4shpNsD4fehKdgG7eJ/GDd/hODRFOmqKtlZxi5nkMuBFbsn4 GWcdp3IbiLHtUbGpuzswt62FJv9Tlg7k5CMl/Hp/Kj6yj6SNPdoQ4fomsCtUVsNrQ07L X9XuKAddxhuO2cpdPW7Ys+e7QuUE1ZjBNRXcp5XSyPm28dHyBRgLbNbLXVf+GJF9AUmC 5SCowOxBv2zuaJ1S6TEMNcJ+/yY+I8wGH+Kd051z45joerNHx3Of+vOlB0c2vGpzLNTd CDoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:subject:references:in-reply-to:message-id :date:cc:to:from:arc-authentication-results; bh=jxt4OyLP2Ubt+X/AQrraBQN3tR/hGFfpubeAHbw4xqE=; b=LybU2yQazu80nUypJTxV9rzUD3mE9VeyItLXZkESwZpMfWDgFGYp8CaR402l5qwvRp wBEBAzgIvfuxJBi15TrWvMAsWuLBsAZlt5a7+8UwaIkm95462LXa6tMJaZLgbBt2gE4q UEaCuaU3U+FKVJ1QM+oenCYm8tS/TCj4pufC5s6/YuF9bjN9TXplXamAXH5nDJdmnr3f uYxMrMcd0r2Lvd5y3neFml6O4LsOCvD0nejlVa42j+GMNkQk3ZsmtTMZF70L2acKFKxv LEvTNfHxUsmQxZuOEqDG/vWwn2FcI0dy05CQRKczSqq8tqlLFhOC85+Kgq2bdqTz3OiC Fl0A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p14-v6si2019959plo.357.2018.07.20.11.02.23; Fri, 20 Jul 2018 11:02:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388392AbeGTSuH (ORCPT + 99 others); Fri, 20 Jul 2018 14:50:07 -0400 Received: from ale.deltatee.com ([207.54.116.67]:38386 "EHLO ale.deltatee.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388326AbeGTSuF (ORCPT ); Fri, 20 Jul 2018 14:50:05 -0400 Received: from cgy1-donard.priv.deltatee.com ([172.16.1.31]) by ale.deltatee.com with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1fgZhn-0008E5-0U; Fri, 20 Jul 2018 12:00:43 -0600 Received: from gunthorp by cgy1-donard.priv.deltatee.com with local (Exim 4.89) (envelope-from ) id 1fgZhl-00012z-6X; Fri, 20 Jul 2018 12:00:37 -0600 From: Logan Gunthorpe To: linux-kernel@vger.kernel.org, linux-ntb@googlegroups.com, Jon Mason Cc: Allen Hubbe , Serge Semin , Shyam Sundar S K , Shuah Khan , Doug Meyer , Logan Gunthorpe Date: Fri, 20 Jul 2018 12:00:31 -0600 Message-Id: <20180720180034.3964-6-logang@deltatee.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180720180034.3964-1-logang@deltatee.com> References: <20180720180034.3964-1-logang@deltatee.com> X-SA-Exim-Connect-IP: 172.16.1.31 X-SA-Exim-Rcpt-To: linux-kernel@vger.kernel.org, linux-ntb@googlegroups.com, jdmason@kudzu.us, allenbh@gmail.com, fancer.lancer@gmail.com, Shyam-sundar.S-k@amd.com, shuah@kernel.org, dmeyer@gigaio.com, logang@deltatee.com X-SA-Exim-Mail-From: gunthorp@deltatee.com X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on ale.deltatee.com X-Spam-Level: X-Spam-Status: No, score=-8.7 required=5.0 tests=ALL_TRUSTED,BAYES_00, GREYLIST_ISWHITE,MYRULES_NO_TEXT autolearn=ham autolearn_force=no version=3.4.1 Subject: [PATCH v2 5/8] NTB: perf: Don't require one more memory window than number of peers X-SA-Exim-Version: 4.2.1 (built Tue, 02 Aug 2016 21:08:31 +0000) X-SA-Exim-Scanned: Yes (on ale.deltatee.com) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- drivers/ntb/test/ntb_perf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/ntb/test/ntb_perf.c b/drivers/ntb/test/ntb_perf.c index 2a9d6b0d1f19..fe27412ffe91 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; } -- 2.11.0