Received: by 10.192.165.148 with SMTP id m20csp1072972imm; Fri, 27 Apr 2018 12:10:05 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrfN6215kPc6KYEEF0kggCpbmPR8CwPaVsUEjqY4gOZZvYnogd89URBdJ5pgFppOoxbqmGM X-Received: by 2002:a17:902:6c4b:: with SMTP id h11-v6mr3415203pln.33.1524856204981; Fri, 27 Apr 2018 12:10:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524856204; cv=none; d=google.com; s=arc-20160816; b=z8DHoywF13fgbLV214CN2AYDa35qFhSDOs4m9dIFvbzyHui3MgYlJ1SgD2zuu5MaKz kXijMbixVL33lw8B5s/fgkTiYbAxRELDJNa6kjFoyQh2IUYy7a95WoHK8iEkctRW2kS4 TOxvK0LY9wqPLW+QahwqjfgMlX49IVQLVPs+jVN+Wt781ogIUFzTfTL82G8h1o+4LELu moIJ1G9+nTwlyHwi8mbMiVHlMsnY6xLnjlFMJpR7407ZQsD2eMMMnF1SrUgml2lohj/T CayzO4QVEdNy4TSvoadwKNuDMLZMPFOZAGl8f0T5ocAcWtFheMY8bh8TPOOZrQ8OM6n+ i4qA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:organization:references :in-reply-to:date:cc:to:from:subject:message-id :arc-authentication-results; bh=uVC2pgxsi3HpWPIc0wuuyagah7zyERtRNlK0v7+9DeM=; b=TLOKlXh+0vBCby6MJcbERrNrT0oP1I6QlWMhMesl9Rvf9lhIwXAB0/sF4nqvja2/Vv jnopDiy6nWE9rcdOQAUULbgzu/wDUe2uExjgkmLkVwdlYfRWmEzuTTpayjhLbuT8rroL otvCLdUBE3p0xCXCefZ+RVn+G0f7ecuFnKweZY9mC3RSn3m+MyXvZwhrYHrULKCeMuQ6 w2VF5EJZ4Mla2v0lr9T8FReFNWQIgJVzU9195x3VSzOw4mMMgBIW0r4k1Wesbl8mnYIC YwdiEsf04nqyxaVjubDa3zNheW8ew9X0aHvjt+680T4Azs1qzf/ZHFH4mcnHj4ZSby2y YUJg== 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f38-v6si1789581plb.44.2018.04.27.12.09.50; Fri, 27 Apr 2018 12:10:04 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932533AbeD0TIj (ORCPT + 99 others); Fri, 27 Apr 2018 15:08:39 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:43534 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1758457AbeD0TIi (ORCPT ); Fri, 27 Apr 2018 15:08:38 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 89AA3401DED5; Fri, 27 Apr 2018 19:08:37 +0000 (UTC) Received: from haswell-e.nc.xsintricity.com (ovpn-122-18.rdu2.redhat.com [10.10.122.18]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E7B75AB586; Fri, 27 Apr 2018 19:08:36 +0000 (UTC) Message-ID: <1524856116.11756.85.camel@redhat.com> Subject: Re: [PATCH] IB/core: Make ib_mad_client_id atomic From: Doug Ledford To: =?ISO-8859-1?Q?H=E5kon?= Bugge Cc: jackm , Jason Gunthorpe , Don Hiatt , Ira Weiny , Sean Hefty , OFED mailing list , linux-kernel@vger.kernel.org Date: Fri, 27 Apr 2018 15:08:36 -0400 In-Reply-To: References: <20180418142450.15581-1-Haakon.Bugge@oracle.com> <1524196555.11756.30.camel@redhat.com> <20180420153451.GF30433@ziepe.ca> <50E3FE4A-2C6E-4493-92E1-383C349FAE3A@oracle.com> <20180423221618.0000795d@dev.mellanox.co.il> <20180426213250.0000515d@dev.mellanox.co.il> <9fdd3ec4-ee91-5442-e753-25d2ecd27ea9@xsintricity.com> Organization: Red Hat, Inc. Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-smZmVzuNnteiOZITtEn4" Mime-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Fri, 27 Apr 2018 19:08:37 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Fri, 27 Apr 2018 19:08:37 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'dledford@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-smZmVzuNnteiOZITtEn4 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, 2018-04-26 at 20:51 +0200, H=C3=A5kon Bugge wrote: > > Jason is out this week. I'll end up processing this one (probably late= r > > today). But I=E2=80=99ll fix up the commit message to suit my tastes w= hen I do. >=20 > Thank you, Doug and Jack, I reworded the commit message, let me know if you think I worded it wrong: commit 69f01b81539c62f3dd96f9f02138ad7b839a0c70 (HEAD -> k.o/wip/dl-for-rc) Author: H=C3=A5kon Bugge Date: Wed Apr 18 16:24:50 2018 +0200 IB/core: Make ib_mad_client_id atomic =20 Currently, kernel protects access to the agent ID allocator on a per port basis using a spinlock, so it is impossible for two apps/threads o= n the same port to get the same TID, but it is entirely possible for two threads on different ports to end up with the same TID. As this can be confusing (regardless of it being legal according to the IB Spec 1.3, C13-18.1.1, in section 13.4.6.4 - TransactionID usage: "Then initiating a new operation, MADHeader:TransactionID shall be set to such a value that within that MAD the combination of TIG, SGID, and MgmtClass is different from that of any other currently executing operation. If the MAD does not have a GRH, its SLID is used in the combination in place o= f an SGID." which guarantees we are legal because our different ports wil= l have different SGID/SLID creating a unique tuple even if the TIDs are identical), and as we might want to open the TID allocator up to more parallel usage later, make the TID an atomic type so that no two allocations, regardless of port number, will be the same. =20 Signed-off-by: H=C3=A5kon Bugge Reviewed-by: Jack Morgenstein Reviewed-by: Ira Weiny Reviewed-by: Zhu Yanjun Signed-off-by: Doug Ledford --=20 Doug Ledford GPG KeyID: B826A3330E572FDD Key fingerprint =3D AE6B 1BDA 122B 23B4 265B 1274 B826 A333 0E57 2FDD --=-smZmVzuNnteiOZITtEn4 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEErmsb2hIrI7QmWxJ0uCajMw5XL90FAlrjdTQACgkQuCajMw5X L93Kmg//d6H/DWtVRSGXTNqMeyPkvVFvCND7YP4U5ocs9EWtsa3JW43l/yXZ7IS/ ivZQeMtIdNK325+AgoGXlyIoCDqw+zjHC+5HCCRisuLNzF0Ni/gQMqnIwkMC2kOw u5qhKEMZRxqs4WQU9VZBrWbyhDVx/QuYbrevcO/Q4bZDfUaqb6kmdTnwYMLK3R9g WX1Xwl1sIAl9mRYI9U88VwQHHL5wPbV6gQqOB2iEELWntkuyO79ClE0ciN50sfcl yHKV5eME/9NvctvKm8+bdviwUec3Zwla/SBrY3KPXVo6vPNsP5YcSCNYiGfNhYza GMOwKSBREzKcAw+wKxGbDjY+tfMFT+3c7Fc7pWYxl1NzoWWb9tfgaHzgi4Hr/BJ2 /P5UPmX/i2NQyIN2HuM9N1gdB9FXlGu/RCNzUMITFU9fHMP7S/aozP4ZDkwGe4nq VC+Uuhj00q0M1CI69HF5PcdghdpkHtErYmYDpy+zDLXk46nO2xDbyI6kNPJj7zTJ kMLKXk91a+OwRhJwYNesvtlV3c4cKEWKE06j+n4a/QB4a10A0m3Joq/jeSOLbcyw R4A7ZXspEVkMr+8Gkm331AtIKewu/qjGMFhsmJElHOP/ISaS7ouvh/bprzl3GFuQ Lo+GvnPmxaVHKOEhkeEV01l3wJl1D+QzeWiGG1nw+MNiKz9rwr8= =O4dY -----END PGP SIGNATURE----- --=-smZmVzuNnteiOZITtEn4--