Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp1460958imm; Fri, 8 Jun 2018 17:12:05 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJoMV7RKGX9MdFHyiCfu67IBes9RNZHUf7XEnrZ3BMwj70s7qJs/6SFQyQKk/BbsU8o/yoa X-Received: by 2002:a65:6343:: with SMTP id p3-v6mr7014341pgv.63.1528503125330; Fri, 08 Jun 2018 17:12:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528503125; cv=none; d=google.com; s=arc-20160816; b=nDAUTYggTyDnXVwMaKandl/uGfVTcbyeoadciSPYVkSiXqejw+GMSRexCcJ8cGHQCM VJbFFE4h7112GSaEWhsZXtkWEdqfi4+xs4WESnFeLLborB5MOZDIGu9L9yO4S9POg4bk X37uPaxIyDo4oPcrr8J1MQtMc6Uj1hIducWLehMeEDyY/b134kz32IatGWXbFy8UA9cA JzqG6/4n+6bhU29cPbdEIt72GWUwCj/DXzoD7crH8i7C4difEu1l8Z2HjgxUxvAmK1op BwKxbVXs8vO+X8YHR6pH3BczkMFysYkv/ObQFX8gq7OC/c7G9nTm9j1U5J1NlN7JXB6m KNBA== 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=WQjJ0AWKI6KStGEfPKpxx5TGsrNvrRvAEGRA2E3qgmnoAwh03latvwLDlEJo7CwdVw q2fUypQCO3PXj5SZeEDaJ8eRpJrM1vVpYFdXUyRBF7hb2/hLkTrB6/d5BsDPwvq3Cnhn xzz9VZ2C5a4y81m4jTWY2rqKawTSJVeyVQfWDB+7IMlUeMAtp0mmkP88o9GniERuI5Jo TkI+AUnXiHttr+sJy7ynpJIWujhA88RY3tBmMKsy3lH78jfhtZlIELVXS28LtMLpUT0J AF+4t+JwTcGqzvSa4jvMvYkK2C23BWPooGV5Oy5lyollw0AcIEB36MJhB8RW3fTmixNu 20mg== 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 w11-v6si11859410plz.333.2018.06.08.17.11.51; Fri, 08 Jun 2018 17:12:05 -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 S932118AbeFIAKb (ORCPT + 99 others); Fri, 8 Jun 2018 20:10:31 -0400 Received: from ale.deltatee.com ([207.54.116.67]:60566 "EHLO ale.deltatee.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753039AbeFIAI1 (ORCPT ); Fri, 8 Jun 2018 20:08:27 -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 1fRRQd-00043r-2Q; Fri, 08 Jun 2018 18:08:26 -0600 Received: from gunthorp by cgy1-donard.priv.deltatee.com with local (Exim 4.89) (envelope-from ) id 1fRRQb-0003cz-Vk; Fri, 08 Jun 2018 18:08:22 -0600 From: Logan Gunthorpe To: linux-kernel@vger.kernel.org, linux-ntb@googlegroups.com Cc: Jon Mason , Dave Jiang , Allen Hubbe , Serge Semin , Shyam Sundar S K , Shuah Khan , Logan Gunthorpe Date: Fri, 8 Jun 2018 18:08:15 -0600 Message-Id: <20180609000819.13883-6-logang@deltatee.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180609000819.13883-1-logang@deltatee.com> References: <20180609000819.13883-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, dave.jiang@intel.com, allenbh@gmail.com, fancer.lancer@gmail.com, Shyam-sundar.S-k@amd.com, shuah@kernel.org, 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 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