From 65c36214b750f17bb33f87fd47faf4fcf5b98da7 Mon Sep 17 00:00:00 2001 From: zzzzzzzzzy9 Date: Tue, 30 Apr 2024 16:55:40 +0800 Subject: [PATCH] rdma: read rdma.max file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is a simple one, just support rdma.max. Signed-off-by: zzzzzzzzzy9 Signed-off-by: Fabiano FidĂȘncio --- src/rdma.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/rdma.rs b/src/rdma.rs index 77969440..5d76fb1e 100644 --- a/src/rdma.rs +++ b/src/rdma.rs @@ -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 { + 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| {