Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2007306imm; Thu, 7 Jun 2018 04:03:58 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKnQQevmiqZnNlsrEqC8Z+ENU1vaXe1RukNUYb/mvB6lr8YGhsgv9G9u2yfntyh1P/N7nee X-Received: by 2002:a17:902:4203:: with SMTP id g3-v6mr1554719pld.315.1528369438385; Thu, 07 Jun 2018 04:03:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528369438; cv=none; d=google.com; s=arc-20160816; b=z9SW3dgE5cRuYfW5zkTP4s30wS8o2Zj+uLGSKITKCN8jBmb8cbm9qUEGygRRB2/sK2 tPtt/D96U6aYJxaoAsE104l6lm8DJeBznU2wyfEUOZfCYFNJHGYYENeANoUU3L3z/1Fk QmAd5a6hQ3w7tonOwXb1RqK+UvifXgq0jCCTs7Fh2QMe19hz66KKCi3vMCB0omtuqfXU 8Ne1FxM2Tw52vLbvV+p3zxIKvVnD70vFnhktUgk+dOWfCQYhAmiQPA/xdHa4FASmPpKy k633PKcTgssxq6/jDBH/pDOefWJgfTSMCV86L97TQCsDLc72G1118VgdnAwtgepVv1bv Mxfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:to:from:dkim-signature:arc-authentication-results; bh=wcn5xdx1h+tX95DVlfy5wYNH8sbLfJdxTw/eeU7NFjA=; b=DO+c0s8NOdiSR6m0EXCi32SgCtDHXXM0nnxTZq6N96QUzWWv9s8dpnJPA18h3PRwsD sxccbDIuBvNLCPHawKXEuVKPVli9uCgbSNOXWv6dTOR4yHkl3b2MBnAOynhviwlSVpVL uh1NOPce1icqfVW9+1hRuGg77XVNr5mzSh3P1AxxFDhXIgAT+aOkOmHDL6PjbF3hefO9 PrlRo+ASu4EMWbFbBQojdArKBC+YjVPr1LWbi26J/IqJLwtlqWFF0REtw/jgxG1WoZkc dp00/RS9LKkgBjGssgw/NIFPR3vn2Z7xLPhPXXlf1LV5uru/f9n9iAUg/tQvV75jSh+Y Cb+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=rth7hNDR; 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=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p15-v6si41523372pgc.463.2018.06.07.04.03.43; Thu, 07 Jun 2018 04:03:58 -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=@oracle.com header.s=corp-2017-10-26 header.b=rth7hNDR; 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=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753324AbeFGKwz (ORCPT + 99 others); Thu, 7 Jun 2018 06:52:55 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:46804 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753001AbeFGKwu (ORCPT ); Thu, 7 Jun 2018 06:52:50 -0400 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w57AojR4025593; Thu, 7 Jun 2018 10:52:23 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : subject : date : message-id : in-reply-to : references; s=corp-2017-10-26; bh=wcn5xdx1h+tX95DVlfy5wYNH8sbLfJdxTw/eeU7NFjA=; b=rth7hNDRi4BADcZtpW2dhZTnlUNyOAtdsVkfmvflPPwEfvhSnEi/eT5rXqcZD4nJixb/ CONNwMfgm0okr3I/ZobESaMpnSKveRZ1f7fhYff000a4vVYt9RuWj/Uyed+Q18eiFHQr 2QdP+ZqoL2e3NLFMhxYZmulunVFuMxwkKsbNEZh0KgsVHZSFV7jH45/t0qAjE7kzLcxc 6JWuywsKrKH++IRJiE42EZKf0Es8MFRnYwzzpqqMIRFpQJALXyPljXn2fSPpaJeKJGqC Jvot3Kk4rbVoKiwJ+j3LavFlRSXESxPFiu2vdN8lBSA4RiCRBSDeLFjeeHA2w7mgKlL8 uA== Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by aserp2120.oracle.com with ESMTP id 2jbvyprdpg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 07 Jun 2018 10:52:23 +0000 Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w57AqMTR012214 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 7 Jun 2018 10:52:22 GMT Received: from abhmp0011.oracle.com (abhmp0011.oracle.com [141.146.116.17]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w57AqKfQ003761; Thu, 7 Jun 2018 10:52:20 GMT Received: from lab02.no.oracle.com (/10.172.144.56) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 07 Jun 2018 03:52:19 -0700 From: Hans Westgaard Ry To: Doug Ledford , Jason Gunthorpe , Hakon Bugge , Parav Pandit , Jack Morgenstein , Pravin Shedge , Matthew Wilcox , Andrew Morton , Jeff Layton , Wei Wang , Chris Mi , Eric Biggers , Rasmus Villemoes , Mel Gorman , linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 0/2] IB:mad Use ID allocator routines to allocate agent number Date: Thu, 7 Jun 2018 12:52:06 +0200 Message-Id: <20180607105208.16332-1-hans.westgaard.ry@oracle.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180529073808.27735-1-hans.westgaard.ry@oracle.com> References: <20180529073808.27735-1-hans.westgaard.ry@oracle.com> X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8916 signatures=668702 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=549 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1805220000 definitions=main-1806070128 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org v2: Implement ida_get_simple_cyclic and use it when allocating ib_mad_client_ids. Hans Westgaard Ry (2): idr: Add ida_simple_get_cyclic IB/mad: Use ID allocator routines to allocate agent number drivers/infiniband/core/mad.c | 24 +++++++++++++--- include/linux/idr.h | 8 ++++-- lib/idr.c | 66 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 92 insertions(+), 6 deletions(-) -- 2.14.3