From patchwork Tue Jan 5 18:58:02 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Parav Pandit X-Patchwork-Id: 7958541 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id E3A7E9F1C0 for ; Tue, 5 Jan 2016 19:02:53 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1DFB0201CD for ; Tue, 5 Jan 2016 19:02:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 465CF200DF for ; Tue, 5 Jan 2016 19:02:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752213AbcAETCb (ORCPT ); Tue, 5 Jan 2016 14:02:31 -0500 Received: from mail-pf0-f194.google.com ([209.85.192.194]:35316 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752249AbcAETAe (ORCPT ); Tue, 5 Jan 2016 14:00:34 -0500 Received: by mail-pf0-f194.google.com with SMTP id e65so21110389pfe.2; Tue, 05 Jan 2016 11:00:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=iQvaJPfAnVSdNJC6u0Iqtp++lFDv4Qy+bty9PvTsYC4=; b=saiV6sE4eMI481539rJywZvgTPGe/uxPfcUKUcK4EKHmkGA3tN2Bsk2O70ftlwtiuT KgDCdHkCZn6KSy815rOqVoK6DeqshuWikZW9mMnnk+xbxUQbAnr07etWknYi58D52HfU RspbNjuqzbvGMwawzpSEUPYKGyt+z7YD27kr9UUXQEO8CjJmrC54d48lVMgnp9ipuqxu CJlHpx/AFZ3SkJV64gG/wwSYacIbrwF6LZpkbzAKqokbieGgzLcrrAg3Iu9ZPUdKqwz/ ZRIUmyi6X4oKLZkhXaGGBJruUK7CxuSGyb0tHKQP/ZO0EnSztYONUIbqYW6H0mf/QqpD SF+A== X-Received: by 10.98.73.19 with SMTP id w19mr137677504pfa.103.1452020433049; Tue, 05 Jan 2016 11:00:33 -0800 (PST) Received: from server1.localdomain ([106.216.177.49]) by smtp.gmail.com with ESMTPSA id q27sm86218546pfi.83.2016.01.05.11.00.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Jan 2016 11:00:31 -0800 (PST) From: Parav Pandit To: cgroups@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org, tj@kernel.org, lizefan@huawei.com, hannes@cmpxchg.org, dledford@redhat.com, liranl@mellanox.com, sean.hefty@intel.com, jgunthorpe@obsidianresearch.com, haggaie@mellanox.com Cc: corbet@lwn.net, james.l.morris@oracle.com, serge@hallyn.com, ogerlitz@mellanox.com, matanb@mellanox.com, raindel@mellanox.com, akpm@linux-foundation.org, linux-security-module@vger.kernel.org, pandit.parav@gmail.com Subject: [PATCHv1 2/6] IB/core: Added members to support rdma cgroup Date: Wed, 6 Jan 2016 00:28:02 +0530 Message-Id: <1452020286-9508-3-git-send-email-pandit.parav@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1452020286-9508-1-git-send-email-pandit.parav@gmail.com> References: <1452020286-9508-1-git-send-email-pandit.parav@gmail.com> Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Added function pointer table to store resource pool specific operation for each resource type (verb and hw). Added list node to link device to rdma cgroup so that it can participate in resource accounting and limit configuration. Signed-off-by: Parav Pandit --- include/rdma/ib_verbs.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h index 9a68a19..1a17249 100644 --- a/include/rdma/ib_verbs.h +++ b/include/rdma/ib_verbs.h @@ -51,6 +51,7 @@ #include #include +#include #include #include #include @@ -1823,6 +1824,12 @@ struct ib_device { u8 node_type; u8 phys_port_cnt; +#ifdef CONFIG_CGROUP_RDMA + struct rdmacg_resource_pool_ops + *rpool_ops[RDMACG_RESOURCE_POOL_TYPE_MAX]; + struct list_head rdmacg_list; +#endif + /** * The following mandatory functions are used only at device * registration. Keep functions such as these at the end of this