Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1089214imu; Wed, 9 Jan 2019 11:24:57 -0800 (PST) X-Google-Smtp-Source: ALg8bN7eE8a7tncNl0ogCuaDTfHAkxGKEtjRkrsGIznN47RpZa33FZ4DpTupJd7wBzMDQMgMvlYv X-Received: by 2002:a63:580a:: with SMTP id m10mr6461757pgb.332.1547061897160; Wed, 09 Jan 2019 11:24:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547061897; cv=none; d=google.com; s=arc-20160816; b=QIPQOrhM4TWTjDuZbk1EBx7PHFguHMtxqBWRwJsgXoIPFMMR4oFzsFTy3QQbkQPsTp /UxYGmpT2n5KPzWuVI6vUk4Nkaeax9ci0mQyzVu++QsiV9JX1Wv0T0xak3fgj7Rs9m73 rEIcKqATDbDw5yy5Eq7Jxhmx1Mg9Mg+QZyl2bxD7f5IMlbLgZDK4Bd1a8nYusEb9veDP 2UUGaOBYXdiUS47V08PXxVSfaxhUgTKlKC6sxtI+HJQlNdA0HSOaICuXD2MUd2Qlw+J8 9XN6TmdrNmqo2Z2JGKykfdZ8MCF0ZqlBgqkghhTcvKY9ukKbQEBaWDqV+rBukdzeJITz UEUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:subject:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:cc:to:from; bh=1G3KkA+Eqn94EdjSSGh6zLV91apFnjRjEXjOUW/HHbY=; b=ZxyVSxihCawYpwbl7Rq3qS7SJk/ARfZH52MsBSg6TqNS7T7BNvxQhs113FeeADTs51 DUd7w7oksV0zD/H/7uVDJPRq+MKmT6vfLZeGDs6t3ZG7moKfHRaJhP56XndI1czOdLvn lJ8LVVrCt9wTIJyzjXUSoyA/QRuNms15xt1BnBthS3G+o/lfZvkG5UPY+P2OgV+Dnhhr OufyqAXj6wtbhZAUmwLvrbgFak4h0SKmAwtxElpWjWD8ivo6z7zsTUDcQ8V4/Ey3dKwm wQzUIW551SlzSnT89CvFOiVYB3kFwK7d5h64eGfJKDMKuA+ONQ8G+7bR1BTziIk+lxQy e8Jg== 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 z22si18663821plo.202.2019.01.09.11.24.41; Wed, 09 Jan 2019 11:24:57 -0800 (PST) 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 S1728249AbfAITWx (ORCPT + 99 others); Wed, 9 Jan 2019 14:22:53 -0500 Received: from ale.deltatee.com ([207.54.116.67]:59722 "EHLO ale.deltatee.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728176AbfAITWt (ORCPT ); Wed, 9 Jan 2019 14:22:49 -0500 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 1ghJR2-00053t-GA; Wed, 09 Jan 2019 12:22:48 -0700 Received: from gunthorp by cgy1-donard.priv.deltatee.com with local (Exim 4.89) (envelope-from ) id 1ghJR1-0001Vq-Hm; Wed, 09 Jan 2019 12:22:39 -0700 From: Logan Gunthorpe To: linux-kernel@vger.kernel.org, linux-ntb@googlegroups.com, Jon Mason Cc: Allen Hubbe , Dave Jiang , Serge Semin , Logan Gunthorpe Date: Wed, 9 Jan 2019 12:22:30 -0700 Message-Id: <20190109192233.5752-6-logang@deltatee.com> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20190109192233.5752-1-logang@deltatee.com> References: <20190109192233.5752-1-logang@deltatee.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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, logang@deltatee.com X-SA-Exim-Mail-From: gunthorp@deltatee.com X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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.2 Subject: [PATCH v3 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 Acked-by: Allen Hubbe Tested-by: Alexander Fomichev --- 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 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; } -- 2.19.0