[PATCHv1 2/6] IB/core: Added members to support rdma cgroup

From: Parav Pandit
Date: Tue Jan 05 2016 - 14:02:37 EST


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 <pandit.parav@xxxxxxxxx>
---
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 <linux/socket.h>
#include <uapi/linux/if_ether.h>

+#include <linux/cgroup_rdma.h>
#include <linux/atomic.h>
#include <linux/mmu_notifier.h>
#include <asm/uaccess.h>
@@ -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
--
1.8.3.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/