Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1098122imu; Wed, 9 Jan 2019 11:34:59 -0800 (PST) X-Google-Smtp-Source: ALg8bN72uPEkO7A4PXtK2INKj97Y05xNxVz/uK/6cp9UeblgZhbvtEJibTiRGHIypdmhjMligq1b X-Received: by 2002:a63:4665:: with SMTP id v37mr6671890pgk.425.1547062499730; Wed, 09 Jan 2019 11:34:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547062499; cv=none; d=google.com; s=arc-20160816; b=Fq5kmHyzHTHoqo03///+mxF7wMK0gFxAcFXhwBuVqCw4XlX9q9bLwQ0hvt2HunxOn1 7SAL2ywmIZChw59ou5yQA+21zH5YdCJmMZvANCHbQCweWv6iMaLPYPFHAgaqCiwA8qDv iEJb8RWfl8YZQJW8Wzdwox2FhJEs2xvU+qW+ja+OdDURRmcEQzz6Cgbp6atKFlUo94Fr xMoXEsacgupqfX8o1aFGUkEWb5dN+O5tP6e55Y+VAG+8M+JtQr4FSQL5KGl5uWiG5XfE QoL/NcdDnBGGkHr+xNoJzqXYkg43ubC4E+NEKdnY9cju6op4DVPGX7UTx99YT6Yo0JWb UiLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:autocrypt:openpgp:from:references:cc:to:subject; bh=2QAkpS1keuEEk+EYl28vy2qZy7iP2QiV840Q7KrFs/A=; b=r7qN5CVDizFhrerI+XlchwhaB1X7bMOCDR/lTlh2tAIUl+jB0/wVhXjZYXVpBWkXFn thESx8hlj1LDrsz0uJ4hLC5IF797fdAliQEYSiBRrqnFtL9zxOApdaM85rflWGEVEFEN lKt3fc6XFgEkhGpDa2IxglWu3gG5/CjqTAyEZL5cFtYX9geeKSF0wrFbN1/dFz2oKNNO zEX3NS8nMsNsaHGE2TEZJ5yuWiYDneqXATkoYtdZAMTXex36nmiG45h+tr/3D/OS9A8S xXRWpY6OOW4bW4y8fZq3mvXWjDcJVu4Tj7FoPehHYFyMFlQSemdJBWDKlgbSTUXLIItX qFZw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k26si9224816pgb.72.2019.01.09.11.34.42; Wed, 09 Jan 2019 11:34: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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728054AbfAITcP (ORCPT + 99 others); Wed, 9 Jan 2019 14:32:15 -0500 Received: from mga05.intel.com ([192.55.52.43]:23052 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726614AbfAITcO (ORCPT ); Wed, 9 Jan 2019 14:32:14 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Jan 2019 11:32:13 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,458,1539673200"; d="scan'208";a="265834753" Received: from djiang5-desk3.ch.intel.com ([143.182.136.93]) by orsmga004.jf.intel.com with ESMTP; 09 Jan 2019 11:32:13 -0800 Subject: Re: [PATCH v3 0/8] Fix breakage caused by the NTB multi-port patchset To: Logan Gunthorpe , linux-kernel@vger.kernel.org, linux-ntb@googlegroups.com, Jon Mason Cc: Allen Hubbe , Serge Semin References: <20190109192233.5752-1-logang@deltatee.com> From: Dave Jiang Openpgp: preference=signencrypt Autocrypt: addr=dave.jiang@intel.com; prefer-encrypt=mutual; keydata= xsPuBE6TbysRDACKOBHZT4ez/3/idMBVQP+cMIJAWfTTLqbHVYLdHMHh4h6IXWLqWgc9AYTx /ajdOrBVGSK9kMuvqRi0iRO1QLOMUAIc2n/44vh/3Fe54QYfgbndeXhHZi7YEwjiTCbpQ336 pS0rS2qQaA8GzFwu96OslLI05j9Ygaqy73qmuk3wxomIYiu9a97aN3oVv1RyTp6gJK1NWT3J On17P1yWUYPvY3KJtpVqnRLkLZeOIiOahgf9+qiYqPhKQI1Ycx4YhbqkNmDG1VqdMtEWREZO DpTti6oecydN37MW1Y+YSzWYDVLWfoLUr2tBveGCRLf/U2n+Tm2PlJR0IZq+BhtuIUVcRLQW vI+XenR8j3vHVNHs9UXW/FPB8Xb5fwY2bJniZ+B4G67nwelhMNWe7H9IcEaI7Eo32fZk+9fo x6GDAhdT0pEetwuhkmI0YYD7cQj1mEx1oEbzX2p/HRW9sHTSv0V2zKbkPvii3qgvCoDb1uLd 4661UoSG0CYaAx8TwBxUqjsBAO9FXDhLHZJadyHmWp64xQGnNgBathuqoSsIWgQWBpfhDACA OYftX52Wp4qc3ZT06NPzGTV35xr4DVftxxUHiwzB/bzARfK8tdoW4A44gN3P03DAu+UqLoqm UP/e8gSLEjoaebjMu8c2iuOhk1ayHkDPc2gugTgLLBWPkhvIEV4rUV9C7TsgAAvNNDAe8X00 Tu1m01A4ToLpYsNWEtM9ZRdKXSo6YS45DFRhel29ZRz24j4ZNIxN9Bee/fn7FrL4HgO01yH+ QULDAtU87AkVoBdU5xBJVj7tGosuV+ia4UCWXjTzb+ERek2503OvNq4xqche3RMoZLsSHiOj 5PjMNX4EA6pf5kRWdNutjmAsXrpZrnviWMPy+zHUzHIw/gaI00lH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UR9vVmpPJZ/UP6VajKqywjPHYBwLAAMF A/9B/PdGc1sZHno0ezuwZO2J9BOsvASNUzamO9to5P9VHTA6UqRvyfXJpNxLF1HjT4ax7Xn4 wGr6V1DCG3JYBmwIZjfinrLINKEK43L+sLbVVi8Mypc32HhNx/cPewROY2vPb4U7y3jhPBtt lt0ZMb75Lh7zY3TnGLOx1AEzmqwZSMJhBBgRCAAJBQJOk28rAhsMAAoJEGQVxPFmo7k+qiUB AKH0QWC+BBBn3pa9tzOz5hTrup+GIzf5TcuCsiAjISEqAPkBTGk5iiGrrHkxsz8VulDVpNxk o6nmKbYpUAltQObU2w== Message-ID: <57aae0aa-fb12-b686-9835-b5dc60d97878@intel.com> Date: Wed, 9 Jan 2019 12:32:12 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.1 MIME-Version: 1.0 In-Reply-To: <20190109192233.5752-1-logang@deltatee.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 1/9/19 12:22 PM, 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. For the revert, I think we should cc stable as well. > > 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. > > 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 >