Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp7239122imm; Tue, 24 Jul 2018 10:39:33 -0700 (PDT) X-Google-Smtp-Source: AAOMgpf0z+jERXa2rGuG+tLlGr528SuHSq1tgZZJB9sRQlXt4R2iYE/ey3k/7HbKR5OliH6ARVu5 X-Received: by 2002:a17:902:4203:: with SMTP id g3-v6mr17670333pld.315.1532453973622; Tue, 24 Jul 2018 10:39:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532453973; cv=none; d=google.com; s=arc-20160816; b=m7n2WZAyjYTcj2+154CISYxhdbVd0vY8cV0ay7aQbKRiZoi6WUJD9zs5vGUtD0AoP3 77GSpHr2ZKrjM7fNH9Ivpe7nYQlFzriLh5F42LFsELcmwtkdDQdVXlSzYWXI0K2XQwRQ J7lLut4AtlFhfm8X8QKgfSeiPwQJ7dl3UVhhpBbNM5oP2NJHos074o3w5iLJRDQTcp6B BnfyFluuOZxYAVQGDyaVfGw/db7RwUJK/0ojDDddeKwnZYeQOyZ/Q9pGx/YiVjV6ugj8 nc3MxUZiRdb4vpOBftFx7siu7HDj0K7PqN+jOCxJg/QhRKdm7AyiB8MpdG2h2Ymp6MUP S+Zg== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:arc-authentication-results; bh=N9TGbrsdONCoQdwHd64Kjwb12SqIrssiI7aanVhC4Z4=; b=oWoMZpqbV1ECMk1qfcr/CxckdryJj4YdQal0Kv2gVa7mZXTNQI1qZ4zDv9vovm3LXg piaaizHwp1Kn0nacfSRYINKVonYn7g14pIb9QsBQiW+NHqTR/d1020N+47Az9B9tooPL RrLgy78ZMpi8nMk397xGgiOTCrTmQg4BPhkLwbujVd+5RQYW9yYAgdMV58/0MSgLQy7K 0qgK+qHmblsmLXwEFDr1C5e0+8sVqjPsxwYz/Rlc8Kkh/ihqjmMkoYV6drnfoOQIJAyQ Uhe7fCYQY6xYTQGx+leClIGEhua4ftSoi3XvLpS9MTxY2hjuVzDHPOJ5Gql15G5/+tdI E4eQ== 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 f5-v6si11770973pga.340.2018.07.24.10.39.18; Tue, 24 Jul 2018 10:39:33 -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 S2388522AbeGXSpT (ORCPT + 99 others); Tue, 24 Jul 2018 14:45:19 -0400 Received: from ale.deltatee.com ([207.54.116.67]:37462 "EHLO ale.deltatee.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388427AbeGXSpT (ORCPT ); Tue, 24 Jul 2018 14:45:19 -0400 Received: from guinness.priv.deltatee.com ([172.16.1.162]) by ale.deltatee.com with esmtp (Exim 4.89) (envelope-from ) id 1fi1Fj-0002XE-AN; Tue, 24 Jul 2018 11:37:40 -0600 To: Allen Hubbe Cc: linux-kernel@vger.kernel.org, linux-ntb@googlegroups.com, Jon Mason , fancer.lancer@gmail.com, Shyam-sundar.S-k@amd.com, shuah@kernel.org, dmeyer@gigaio.com References: <20180720180034.3964-1-logang@deltatee.com> <20180720180034.3964-5-logang@deltatee.com> From: Logan Gunthorpe Message-ID: <8809f02e-93de-f81a-31e0-90f2c1983b70@deltatee.com> Date: Tue, 24 Jul 2018 11:37:37 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 172.16.1.162 X-SA-Exim-Rcpt-To: dmeyer@gigaio.com, shuah@kernel.org, Shyam-sundar.S-k@amd.com, fancer.lancer@gmail.com, jdmason@kudzu.us, linux-ntb@googlegroups.com, linux-kernel@vger.kernel.org, allenbh@gmail.com X-SA-Exim-Mail-From: logang@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.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, GREYLIST_ISWHITE autolearn=ham autolearn_force=no version=3.4.1 Subject: Re: [PATCH v2 4/8] NTB: ntb_pingpong: Choose doorbells based on port number 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 On 24/07/18 11:26 AM, Allen Hubbe wrote: > On Mon, Jul 23, 2018 at 12:08 PM Logan Gunthorpe wrote: >> I don't think you'll ever have a case where two peers have the same >> index, as the index is really an abstract concept the hardware doesn't >> really know about. > > That is the point of index, that there should never be two peers with > the same index, and also that the range of index values is bounded. Yes, I think we are making the same point. > Port numbers are problematic, so I'm worried about the change to use > port number in the client drivers instead of using index. For > example, this change assumes that the index value is < bits per long > long, because the value is used in BIT_ULL(port number). Huh?, I'm not making that change... We still use the index to refer to the peer, but the resource we are using is based on the port number, just as it was before my changes. Perhaps you can point out in my patches what change you are worried about? > Maybe I'm missing something... In the crosslink case, there is > another doorbell register on the other side of the crosslink. Whether > to use the nearby or via-crosslink doorbell depends on the peer > index... making assumptions about the hw driver, but is that about > right? Not really. Given that we know there are only two peers, we always use the other side's doorbell register. You'd only use the nearby doorbell register if you wanted to trigger your own interrupt -- that would be weird and we don't really have the API sophistication to do that. If we wanted to support multiple peers with some number in crosslink then we'd need to revamp things _significantly_. In this case we'd have multiple doorbell registers which each apply to a different subset of peers. This gets _very_ complicated and hurts my head. But as I said, I'm not trying to add new functionality for multi-peer crosslink or anything like that. I'm just trying to fix the 2 crosslink peer case so it works like it did when it was originally merged. Logan