Skip to content

Commit dc60c1d

Browse files
committed
specs-go/config:: Simplified RDMA limit definitions
Simplified RDMA limits definitions. Signed-off-by: Parav Pandit <[email protected]>
1 parent 53f82a9 commit dc60c1d

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

specs-go/config.go

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -320,13 +320,7 @@ type LinuxNetwork struct {
320320
Priorities []LinuxInterfacePriority `json:"priorities,omitempty"`
321321
}
322322

323-
// LinuxRdma for Linux cgroup 'rdma' resource management (Linux 4.11)
324-
type LinuxRdma struct {
325-
// Limits are a set of key value pairs that define RDMA resource limits,
326-
// where the key is device name and value is resource limits.
327-
Limits map[string]LinuxRdmaLimit `json:"limits,omitempty"`
328-
}
329-
323+
// LinuxRdmaLimit for Linux cgroup 'rdma' resource management (Linux 4.11)
330324
type LinuxRdmaLimit struct {
331325
// Maximum number of HCA handles that can be opened. Default is "no limit".
332326
HcaHandles *uint32 `json:"hca_handles,omitempty"`
@@ -351,7 +345,9 @@ type LinuxResources struct {
351345
// Network restriction configuration
352346
Network *LinuxNetwork `json:"network,omitempty"`
353347
// Rdma resource restriction configuration
354-
RdmaLimits LinuxRdma `json:"rdmaLimits,omitempty"`
348+
// Limits are a set of key value pairs that define RDMA resource limits,
349+
// where the key is device name and value is resource limits.
350+
RdmaLimits map[string]LinuxRdmaLimit `json:"rdmaLimits,omitempty"`
355351
}
356352

357353
// LinuxDevice represents the mknod information for a Linux special device file

0 commit comments

Comments
 (0)