sma: interface for querying QoS capabilities
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com> Change-Id: I6013205499c122cad95d807c84e609f188b4d2d2 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14189 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
f14c7d7578
commit
b994ebdfbd
@ -13,6 +13,14 @@ package sma;
|
|||||||
|
|
||||||
option go_package = "spdk.io/sma";
|
option go_package = "spdk.io/sma";
|
||||||
|
|
||||||
|
// Enumeration defining types of devices
|
||||||
|
enum DeviceType {
|
||||||
|
DEVICE_TYPE_INVALID = 0;
|
||||||
|
DEVICE_TYPE_NVME = 1;
|
||||||
|
DEVICE_TYPE_VIRTIO_BLK = 2;
|
||||||
|
DEVICE_TYPE_NVMF_TCP = 3;
|
||||||
|
}
|
||||||
|
|
||||||
// Volume's crypto parameters
|
// Volume's crypto parameters
|
||||||
message VolumeCryptoParameters {
|
message VolumeCryptoParameters {
|
||||||
// Key to be used for encryption
|
// Key to be used for encryption
|
||||||
@ -120,7 +128,8 @@ message SetQosRequest {
|
|||||||
// the QoS will be set up on the whole device (all volumes attached to that
|
// the QoS will be set up on the whole device (all volumes attached to that
|
||||||
// device will share QoS settings). Some device types might only support
|
// device will share QoS settings). Some device types might only support
|
||||||
// configuring QoS on per-device (volume_id must be empty) or per-volume level
|
// configuring QoS on per-device (volume_id must be empty) or per-volume level
|
||||||
// (volume_id cannot be empty).
|
// (volume_id cannot be empty). This information can be obtained by sending a
|
||||||
|
// GetQosCapabilities request.
|
||||||
bytes volume_id = 2;
|
bytes volume_id = 2;
|
||||||
// Maximum allowed IOPS/bandwidth
|
// Maximum allowed IOPS/bandwidth
|
||||||
QosLimit maximum = 3;
|
QosLimit maximum = 3;
|
||||||
@ -129,6 +138,34 @@ message SetQosRequest {
|
|||||||
// SetQos response
|
// SetQos response
|
||||||
message SetQosResponse {}
|
message SetQosResponse {}
|
||||||
|
|
||||||
|
// Get QoS capabilities request
|
||||||
|
message GetQosCapabilitiesRequest {
|
||||||
|
// Type of a device to query for QoS capabilities
|
||||||
|
DeviceType device_type = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get QoS capabilities response
|
||||||
|
message GetQosCapabilitiesResponse {
|
||||||
|
message QosCapabilities {
|
||||||
|
// Read IOPS
|
||||||
|
bool rd_iops = 1;
|
||||||
|
// Write IOPS
|
||||||
|
bool wr_iops = 2;
|
||||||
|
// Read/write IOPS
|
||||||
|
bool rw_iops = 3;
|
||||||
|
// Read bandwidth
|
||||||
|
bool rd_bandwidth = 4;
|
||||||
|
// Write bandwidth
|
||||||
|
bool wr_bandwidth = 5;
|
||||||
|
// Read/write bandwidth
|
||||||
|
bool rw_bandwidth = 6;
|
||||||
|
}
|
||||||
|
// Device level maximum QoS limits
|
||||||
|
QosCapabilities max_device_caps = 1;
|
||||||
|
// Volume level maximum QoS limits
|
||||||
|
QosCapabilities max_volume_caps = 2;
|
||||||
|
};
|
||||||
|
|
||||||
// Storage Management Agent gRPC service definition
|
// Storage Management Agent gRPC service definition
|
||||||
service StorageManagementAgent {
|
service StorageManagementAgent {
|
||||||
// Creates a new device. A device is an entity that can be used to expose
|
// Creates a new device. A device is an entity that can be used to expose
|
||||||
@ -151,4 +188,7 @@ service StorageManagementAgent {
|
|||||||
// Configures QoS on a device/volume
|
// Configures QoS on a device/volume
|
||||||
rpc SetQos (SetQosRequest)
|
rpc SetQos (SetQosRequest)
|
||||||
returns (SetQosResponse) {}
|
returns (SetQosResponse) {}
|
||||||
|
// Returns QoS capabilities of a given device type
|
||||||
|
rpc GetQosCapabilities (GetQosCapabilitiesRequest)
|
||||||
|
returns (GetQosCapabilitiesResponse) {}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user