From f14c7d757879446e133dae15bb5376c371c589af Mon Sep 17 00:00:00 2001 From: Konrad Sztyber Date: Wed, 24 Aug 2022 07:45:49 +0200 Subject: [PATCH] sma: interface for configuring quality of service Signed-off-by: Konrad Sztyber Change-Id: I6907498e369b58d2b3dd96981dfdba79ba87f6d4 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14188 Tested-by: SPDK CI Jenkins Reviewed-by: Jim Harris Reviewed-by: Ben Walker Reviewed-by: Tomasz Zawadzki --- python/spdk/sma/proto/sma.proto | 38 +++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/python/spdk/sma/proto/sma.proto b/python/spdk/sma/proto/sma.proto index 0d20f0b52..7f1f04c07 100644 --- a/python/spdk/sma/proto/sma.proto +++ b/python/spdk/sma/proto/sma.proto @@ -94,6 +94,41 @@ message DetachVolumeRequest { // Detach volume response message DetachVolumeResponse {} +// QoS limit values. 0 means unlimited, while UINT64_MAX means to leave the +// current limit value unchanged. If one of the limits isn't supported by a +// given device/volume, it must be set to 0. +message QosLimit { + // Read kIOPS + uint64 rd_iops = 1; + // Write kIOPS + uint64 wr_iops = 2; + // Read/write kIOPS + uint64 rw_iops = 3; + // Read bandwidth (MB/s) + uint64 rd_bandwidth = 4; + // Write bandwidth (MB/s) + uint64 wr_bandwidth = 5; + // Read/write bandwidth (MB/s) + uint64 rw_bandwidth = 6; +} + +// SetQos request +message SetQosRequest { + // Device handle + string device_handle = 1; + // GUID/UUID of a volume to configure QoS on. If this parameter is omitted, + // 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 + // configuring QoS on per-device (volume_id must be empty) or per-volume level + // (volume_id cannot be empty). + bytes volume_id = 2; + // Maximum allowed IOPS/bandwidth + QosLimit maximum = 3; +} + +// SetQos response +message SetQosResponse {} + // Storage Management Agent gRPC service definition service StorageManagementAgent { // Creates a new device. A device is an entity that can be used to expose @@ -113,4 +148,7 @@ service StorageManagementAgent { // Detaches a volume from a device rpc DetachVolume (DetachVolumeRequest) returns (DetachVolumeResponse) {} + // Configures QoS on a device/volume + rpc SetQos (SetQosRequest) + returns (SetQosResponse) {} }