Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2743822imj; Mon, 11 Feb 2019 07:50:59 -0800 (PST) X-Google-Smtp-Source: AHgI3IYRU8NFiLo7/EygO9SonGdNN+LaofDA8F8A/tkTj/PPTmciBI6br/KnM67O4qVGfoEgjGXl X-Received: by 2002:a17:902:ba8e:: with SMTP id k14mr37706338pls.219.1549900259140; Mon, 11 Feb 2019 07:50:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549900259; cv=none; d=google.com; s=arc-20160816; b=IACqD8yRuKhHkmO4AX96AKF/mIm668Ku+NyNHXGbH2jYD9xC57tgPTdJ3sMzoKA4X8 y/j5mW8TOP3wWQSn4xl4a1DflDCli+9GJAFM3AWawlDsrtp6N9VU2ZrZyivCApxJsjPv UTQy+OtZoEfnIHUK39xVzEPoWuwkvf47v8ViPnWT64EdLkh3E9jTw7jTChy0mu/SURSi +KIxAzxKKNbwdU+a+5qve7G8SeZjSYHKruFfxTahFUQouKeWQ55XhFQQN2Xo37VUMpvI /IMYFRSVg/iH8TIttTAD7xSxuZu8q+Gtx3XxBdYpmlA7XC03MRs8fliyuZllRz8jcS2m +ICg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=Tstql8YTOu4MoEgSzgXoCCPJCMqyNx9aLo/AydYYf7A=; b=yZQIBK4QhKECJ9BMs8GNgBuLmBzWRo7cTnhjYqqVToTf1FhJZeVnwT9CCqkR4cMhE0 KMi+nDUjEASm36z20oNjXRhXaBmH3sQF9kKy3nGhnByOJ+FY/pny+9KP90Wg0914EEws dPTZxwnoarl0Esum+2/Bz6gku2NFEYFC3xUazK90nDnS3SjdqHx1Nt+8LEhvpzF9fIor SJtXyex5zg+LQsPxpKAeCPcE4nSm0ObnQGLIDfUQTRwQfyM4wBu50rARez2dfBpoXdiT cpY6Pj9orY1eSfGgdlLOL2iRjGroC/e6uJml6UfLOTPfXyVNYTGyVnoy30WhkNyVKKdL BUgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kudzu-us.20150623.gappssmtp.com header.s=20150623 header.b=UZpU06VI; 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 g4si4748219pfi.233.2019.02.11.07.50.41; Mon, 11 Feb 2019 07:50:59 -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; dkim=pass header.i=@kudzu-us.20150623.gappssmtp.com header.s=20150623 header.b=UZpU06VI; 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 S1733089AbfBKPsh (ORCPT + 99 others); Mon, 11 Feb 2019 10:48:37 -0500 Received: from mail-yb1-f194.google.com ([209.85.219.194]:45724 "EHLO mail-yb1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731392AbfBKOkh (ORCPT ); Mon, 11 Feb 2019 09:40:37 -0500 Received: by mail-yb1-f194.google.com with SMTP id e131so4218853ybh.12 for ; Mon, 11 Feb 2019 06:40:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kudzu-us.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=Tstql8YTOu4MoEgSzgXoCCPJCMqyNx9aLo/AydYYf7A=; b=UZpU06VI5nyGPUji3iN6mgbZFYoiHE0jSh8jNTVpReUQH8ij4FLz/7rANY//d7VJYt Cw5NUL9rveNsjVoqjRhv9vJDWQp2ML0XHgmyqIB/4V+YuOz9n+iRhWFX5SuDoqED/FXK yKkLVwXhSwLUMn5jCn7+YAqgQLBCHK3CIfqnlPCSWb53VudDqqdLzB3nGCg5cfkEd0PI lfo3M3nQRd/pLLJFiwbPfEobzPjeN0kJLnvaOHyAOjmXGImLS56hi7sn+iUN7DTEUyau 56+Tf/fxiiOH4METmU/GMlg3XbymmUWIGh5EQeefwiXMj34OUKS69jZp5s0ou8AjH0zQ iQNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=Tstql8YTOu4MoEgSzgXoCCPJCMqyNx9aLo/AydYYf7A=; b=HmJ+KIOcjNn6wo8ceHRkWBhuv0dSORZgUXer8NpJxxy2azGgmnocvKrm9WOmFRFR8k YNV/widdXGh/6sHRRcpSx5g0aOFv3/30teWf3M9x7P+OahnCZYTleDVw3qJf6djsnJet jqODeh/tR+8SLQtWiQJ00qODItMDkczrhAlutGA/KM72oKVgEeN49OUt6IrP0r2BQ5KV EQ9gFMugqiaxHimZeZyCG1tXoDQHdVWvwvxXAJVQNvBwrWBTv4das7WeMLHCCX7uemDI ICO8+8CTO+7HRXFwzmCLWheNQLAadtgvtT2wE2b3pkrxFWyEVIqhY9tuN1xsTTJdJjTc 56LA== X-Gm-Message-State: AHQUAuZu39Eid3iOqVmMYOUaPThkerz2TinEOmM6d7M0zrkU2G+KbnRy 6G2JZpjlEQiXXDDcQMKj1YKgoA== X-Received: by 2002:a25:2fd4:: with SMTP id v203mr24348553ybv.184.1549896036623; Mon, 11 Feb 2019 06:40:36 -0800 (PST) Received: from kudzu.us (76-230-155-4.lightspeed.rlghnc.sbcglobal.net. [76.230.155.4]) by smtp.gmail.com with ESMTPSA id 139sm4195958ywt.78.2019.02.11.06.40.36 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 11 Feb 2019 06:40:36 -0800 (PST) Date: Mon, 11 Feb 2019 09:40:34 -0500 From: Jon Mason To: Logan Gunthorpe Cc: linux-kernel@vger.kernel.org, linux-ntb@googlegroups.com, Allen Hubbe , Dave Jiang , Serge Semin Subject: Re: [PATCH v3 0/8] Fix breakage caused by the NTB multi-port patchset Message-ID: <20190211144034.GC13951@kudzu.us> References: <20190109192233.5752-1-logang@deltatee.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190109192233.5752-1-logang@deltatee.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 09, 2019 at 12:22:25PM -0700, Logan Gunthorpe wrote: > Hey, > > I'm resending this because I've recently found out that the change we > made to use the NTB struct device in DMA allocations is wrong and > needs to be reverted. Turns out that, when running with an IOMMU, > dma_alloc_coherent() will always fail if you pass it the NTB struct > device. This is because the device has not been assigned an IOMMU > group and the Intel IOMMU at least expect the devices to be on the PCI > bus and be able to find a proper bus-dev-fn number through a struct > pci device. Therefore, we must revert the change and I've changed > patch 2 to do this and remove the no longer necessary DMA mask > adjustments. > > I'm not sure if we can get past the impass in getting this series merged: > I still maintain every patch in this series is necessary to fix a > regression and there's no way to add port numbers to switchtec in the > crosslink configuration so it can't be fixed in the other way that was > suggested. Given the need for this to get in (as it does fix actual problems) and the absence of comments on v3, I'm adding this to the ntb-next branch. If there is anyone that has anything more to say on this, please do so immediately. Otherwise, I think this probably needs to be moved to the ntb branch and go into 5.1-rc1. Thoughts? Thanks, Jon > > Logan > > -- > > Changes since v2: > - Rebased on v5.0-rc1 > - Modify Patch 2 to revert back to using the PCI struct device > instead of the NTB struct device in DMA calls > - Collected Allen's Acks > - Collected Alexander's Tested-By > > Changes since v1: > - Rebased onto ntb-next (there was a minor conflict in a recent change > to the intel driver) > - Collected Dave's Ack > > -- > > Logan Gunthorpe (8): > NTB: ntb_tool: reading the link file should not end in a NULL byte > NTB: Revert the change to use the NTB device dev for DMA allocations > NTB: Fix the default port and peer numbers for legacy drivers > NTB: ntb_pingpong: Choose doorbells based on port number > NTB: perf: Don't require one more memory window than number of peers > NTB: perf: Fix support for hardware that doesn't have port numbers > NTB: perf: Fix race condition when run with ntb_test > NTB: ntb_test: Fix bug when counting remote files > > drivers/ntb/hw/amd/ntb_hw_amd.c | 4 ---- > drivers/ntb/hw/idt/ntb_hw_idt.c | 6 ----- > drivers/ntb/hw/intel/ntb_hw_gen1.c | 4 ---- > drivers/ntb/ntb.c | 9 ++------ > drivers/ntb/test/ntb_perf.c | 29 +++++++++++++++++++------ > drivers/ntb/test/ntb_pingpong.c | 14 +++++------- > drivers/ntb/test/ntb_tool.c | 9 ++++---- > tools/testing/selftests/ntb/ntb_test.sh | 2 +- > 8 files changed, 35 insertions(+), 42 deletions(-) > > -- > 2.19.0