mirror of
https://github.com/kata-containers/cgroups-rs.git
synced 2026-08-05 02:13:23 +00:00
rdma: read rdma.max file
This is a simple one, just support rdma.max. Signed-off-by: zzzzzzzzzy9 <zhang.yu58@zte.com.cn> Signed-off-by: Fabiano Fidêncio <fidencio@northflank.com>
This commit is contained in:
committed by
Fabiano Fidêncio
parent
db822470e5
commit
65c36214b7
@@ -81,6 +81,11 @@ impl RdmaController {
|
||||
.and_then(read_string_from)
|
||||
}
|
||||
|
||||
/// Returns the max usage of RDMA/IB specific resources.
|
||||
pub fn max(&self) -> Result<String> {
|
||||
self.open_path("rdma.max", false).and_then(read_string_from)
|
||||
}
|
||||
|
||||
/// Set a maximum usage for each RDMA/IB resource.
|
||||
pub fn set_max(&self, max: &str) -> Result<()> {
|
||||
self.open_path("rdma.max", true).and_then(|mut file| {
|
||||
|
||||
Reference in New Issue
Block a user