Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp7276431imm; Tue, 24 Jul 2018 11:13:29 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeDQG+zJ3FAno9suQPFk1dwyM7vKnrc1nPcLCTD1qH0EMV2sm+lRnl6VsPchntoSJsfhvS3 X-Received: by 2002:a65:5641:: with SMTP id m1-v6mr17794515pgs.246.1532456009325; Tue, 24 Jul 2018 11:13:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532456009; cv=none; d=google.com; s=arc-20160816; b=0z2a5oSWtGdqPSU7v+99UhHWh1GhjkAbPUUe326vm6zhVP98W1wojleW3R4x79YKSN sw+occOq35d0XRGzQf/AWCIMyxVdLo/1f1/rQuhNT390rfAfIXycZIAeLOM4eo5vzN0+ 7R+1pJLHkaxGf9uVGQ0gv6nsIkL/GqMKLlCncgj3BCuYXCNekh1yVv3wnd8cUHdsZ0Mf f3XnCpq7r6Dhn+Rs0MNuFCaQ0niZKBmDL0ZDW9gRGdUsvaJ0SqRsr1WABF0Zjn/LbUVO MIHhVe21iLej4xB7oj225DWWparWHb4O1HPry1PIa+7ihz2LMWFgRtjqcjfai99oxOk3 bUaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature :arc-authentication-results; bh=i3elQdLne5LPkd+vmZTPUOaGdqdb9m7zCuJuwDIywFM=; b=sxt5LlXqGjXz/pO+ua4OIbJfaFCpM9TndtDcEZxZiihK8HFvMvsrojhUQ1HmXMZuRd mOtCXPF5cW6OnmyakCAf3T1bVSGYG+/8ianL4ouvc2lwzxAmXPmiai67rCe2L21D94HZ k+0eOK++gyaMctEBfpQoYpGnPOVslJT2KLSsj+7+n9briT/XtqhasNxb0I1lpm9ZNa2x wVmtZ3ZEZ9MidaB6w1mhqdN2V9ErjLcHWuU2NGoJ0Q557cF5Bwtqk9db1Nv2gx7ZO1oW 8e0eUnrLWvK7SiaIvZCuiqtZkQFhu/V0iVCPlyz3GRIG+XCpt1+KbLNt4bw7Qzdj8zl/ zg4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=AKYHt5bI; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 31-v6si11564053plg.260.2018.07.24.11.13.14; Tue, 24 Jul 2018 11:13:29 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=AKYHt5bI; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388534AbeGXTUF (ORCPT + 99 others); Tue, 24 Jul 2018 15:20:05 -0400 Received: from mail-wm0-f42.google.com ([74.125.82.42]:37201 "EHLO mail-wm0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388436AbeGXTUF (ORCPT ); Tue, 24 Jul 2018 15:20:05 -0400 Received: by mail-wm0-f42.google.com with SMTP id n11-v6so3445506wmc.2 for ; Tue, 24 Jul 2018 11:12:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=i3elQdLne5LPkd+vmZTPUOaGdqdb9m7zCuJuwDIywFM=; b=AKYHt5bIG/VsO6QSEjC+1P0Ok5m2GiyfCT0wVa5Fe/miHu5VvUxkoe2hkLrlGsUu6v kZUsq1sHqhvftnxS8h9PSXj93PG8UZX86hqhKubIdG5w6yG1Hb6TouQ9Sg6erJW5kY4t MtpNs90xtrfjKGCDFHkvu7joDDyCfb2+mdi3Z1x5qABKf/++uBwxXT5ep3yFpCGWXsdp ksmFRr5GsUHO8JcLi3Ci4fhdbQUKTAHfr23QXBohOURUFkubx8NvWQpoFTKUfMZmvAfx +x+O8FeRb1GhFnsfoRL4xVcw8ZjRgayoKPlZliITSDlpYfMMMQ8WUDA8C44qOzUiiiBJ E5Bg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=i3elQdLne5LPkd+vmZTPUOaGdqdb9m7zCuJuwDIywFM=; b=CPdFRxliMXARQxaqZVNEfqgAJmu90cM5TPEBeTsCDcpU40fYx9qFU9JvdyvphDeI/Y u6VG19XSVIY8+tU97o1ib25aRNWmDXAVbtzO93AukcOxrCsQT8nT6Dx4LW3kYfx9JwPh Db+tM4Gch9cDquJCGyTDyUtnv9QRnvsKudE6v/LYrwupUvDtjBfqlbCYeDcWIuYH/d+J Wdf7yK4b9DM9JqMU2i3AgmOTa3GU36Wj6Ik7vqwEipo0jhDqjXa8YRcTsho1or5jZhAV KmkJf0f00ugDoINKigiWIJ+tqRjgzv5lX5uGkIpNMecc8ZQF9nIT1qtQjOF5nuu6k0Fv aQNg== X-Gm-Message-State: AOUpUlFcI6TcWn4jZoUQZjuWfnOpNIMVSagLZKWXtQP/6fA8H+Lhgsy2 jk8/g0qdbXFAjkk2mQ9dCz7U8MNVLCxF/8YbaXM= X-Received: by 2002:a1c:57c1:: with SMTP id l184-v6mr2652897wmb.16.1532455943269; Tue, 24 Jul 2018 11:12:23 -0700 (PDT) MIME-Version: 1.0 References: <20180720180034.3964-1-logang@deltatee.com> <20180720180034.3964-5-logang@deltatee.com> <8809f02e-93de-f81a-31e0-90f2c1983b70@deltatee.com> In-Reply-To: <8809f02e-93de-f81a-31e0-90f2c1983b70@deltatee.com> From: Allen Hubbe Date: Tue, 24 Jul 2018 14:12:11 -0400 Message-ID: Subject: Re: [PATCH v2 4/8] NTB: ntb_pingpong: Choose doorbells based on port number To: logang@deltatee.com 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 Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 24, 2018 at 1:37 PM Logan Gunthorpe wrote: > 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. ...huh, looks like peer index was omitted from ntb_peer_db_set and friends. Adding peer index there would make the interface consistent with other ntb_peer functions. Peer index would allow the hw driver to select which doorbell register to use for each peer. Adding a ntb_peer_db_valid_bits to that would allow a subset of bits in the shared register to be associated with each peer. I think that's all that would need to change, not significantly more, to support multiple doorbell registers associated with different subsets of peers. The complication would at least be hidden in the hw driver, where it would need to maintain some mapping from peer index to the right set of registers. > 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. I thought for sure ntb_peer_db_set already had peer index, and I was wrong. Go ahead with the change as in your patch, I won't force the issue or that you to do that extra work and touch all the drivers again for this. It can be addressed when there is renued interest in making things work more than one peer. This patch, and the others in this series: Acked-by: Allen Hubbe