diff --git a/specs-go/config.go b/specs-go/config.go index c63cb8dca..bbdf6ab17 100644 --- a/specs-go/config.go +++ b/specs-go/config.go @@ -322,8 +322,12 @@ type LinuxNetwork struct { // LinuxRdma for Linux cgroup 'rdma' resource management (Linux 4.11) type LinuxRdma struct { - // Hca device name whose resources to be restricted - HcaDevice string `json:"hca_device,omitempty"` + // Limits are a set of key value pairs that define RDMA resource limits, + // where the key is device name and value is resource limits. + RdmaLimits map[string]LinuxRdmaLimit `json:"limits,omitempty"` +} + +type LinuxRdmaLimit struct { // Maximum number of HCA handles that can be opened. Default is "no limit". HcaHandles *uint32 `json:"hca_handles,omitempty"` // Maximum number of HCA objects that can be created. Default is "no limit". @@ -347,7 +351,7 @@ type LinuxResources struct { // Network restriction configuration Network *LinuxNetwork `json:"network,omitempty"` // Rdma resource restriction configuration - RdmaLimits []LinuxRdma `json:"rdmaLimits,omitempty"` + RdmaLimits LinuxRdma `json:"rdmaLimits,omitempty"` } // LinuxDevice represents the mknod information for a Linux special device file