mirror of
https://github.com/kata-containers/cgroups-rs.git
synced 2026-08-05 02:13:23 +00:00
Merge pull request #135 from zzzzzzzzzy9/pull-branch
rdma: read rdma.max file
This commit is contained in:
@@ -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