linux/include/linux/cgroup_rdma.h

/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Copyright (C) 2016 Parav Pandit <[email protected]>
 */

#ifndef _CGROUP_RDMA_H
#define _CGROUP_RDMA_H

#include <linux/cgroup.h>

enum rdmacg_resource_type {};

#ifdef CONFIG_CGROUP_RDMA

struct rdma_cgroup {};

struct rdmacg_device {};

/*
 * APIs for RDMA/IB stack to publish when a device wants to
 * participate in resource accounting
 */
void rdmacg_register_device(struct rdmacg_device *device);
void rdmacg_unregister_device(struct rdmacg_device *device);

/* APIs for RDMA/IB stack to charge/uncharge pool specific resources */
int rdmacg_try_charge(struct rdma_cgroup **rdmacg,
		      struct rdmacg_device *device,
		      enum rdmacg_resource_type index);
void rdmacg_uncharge(struct rdma_cgroup *cg,
		     struct rdmacg_device *device,
		     enum rdmacg_resource_type index);
#endif	/* CONFIG_CGROUP_RDMA */
#endif	/* _CGROUP_RDMA_H */