Skip to content

Commit

Permalink
rdma: read rdma.max file
Browse files Browse the repository at this point in the history
  • Loading branch information
zzzzzzzzzy9 committed May 13, 2024
1 parent 69ef63a commit e121e04
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/rdma.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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| {
Expand Down

0 comments on commit e121e04

Please sign in to comment.