This source file includes following definitions.
- ib_device_register_rdmacg
- ib_device_unregister_rdmacg
- ib_rdmacg_try_charge
- ib_rdmacg_uncharge
1
2
3
4
5
6 #include "core_priv.h"
7
8
9
10
11
12
13
14
15
16
17 void ib_device_register_rdmacg(struct ib_device *device)
18 {
19 device->cg_device.name = device->name;
20 rdmacg_register_device(&device->cg_device);
21 }
22
23
24
25
26
27
28
29
30
31
32 void ib_device_unregister_rdmacg(struct ib_device *device)
33 {
34 rdmacg_unregister_device(&device->cg_device);
35 }
36
37 int ib_rdmacg_try_charge(struct ib_rdmacg_object *cg_obj,
38 struct ib_device *device,
39 enum rdmacg_resource_type resource_index)
40 {
41 return rdmacg_try_charge(&cg_obj->cg, &device->cg_device,
42 resource_index);
43 }
44 EXPORT_SYMBOL(ib_rdmacg_try_charge);
45
46 void ib_rdmacg_uncharge(struct ib_rdmacg_object *cg_obj,
47 struct ib_device *device,
48 enum rdmacg_resource_type resource_index)
49 {
50 rdmacg_uncharge(cg_obj->cg, &device->cg_device,
51 resource_index);
52 }
53 EXPORT_SYMBOL(ib_rdmacg_uncharge);