File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -141,12 +141,13 @@ module Sriov = struct
141141 if is_support then [" sriov" ] else []
142142
143143 let config_sriov ~enable dev =
144+ let op = if enable then " enable" else " disable" in
144145 let open Rresult.R.Infix in
145146 Sysfs. get_driver_name_err dev >> = fun driver ->
146147 let config = Modprobe. get_config_from_comments driver in
147148 match Modprobe. get_vf_param config with
148149 | Some vf_param ->
149- debug " enable SR-IOV on a device: %s via modprobe" dev;
150+ debug " %s SR-IOV on a device: %s via modprobe" op dev;
150151 (if enable then Modprobe. get_maxvfs driver config else Ok 0 ) >> = fun numvfs ->
151152 (* CA-287340: Even if the current numvfs equals to the target numvfs,
152153 it is still needed to update SR-IOV modprobe config file, as the
@@ -158,7 +159,7 @@ module Sriov = struct
158159 else
159160 Ok Modprobe_successful_requires_reboot
160161 | None ->
161- debug " enable SR-IOV on a device: %s via sysfs" dev;
162+ debug " %s SR-IOV on a device: %s via sysfs" op dev;
162163 begin
163164 if enable then Sysfs. get_sriov_maxvfs dev
164165 else Sysfs. unbind_child_vfs dev >> = fun () -> Ok 0
You can’t perform that action at this time.
0 commit comments