Merge pull request #135 from zzzzzzzzzy9/pull-branch

rdma: read rdma.max file
This commit is contained in:
Fupan Li
2025-05-29 16:30:09 +08:00
committed by GitHub

View File

@@ -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| {