Commit b994ebdf authored by Konrad Sztyber's avatar Konrad Sztyber Committed by Tomasz Zawadzki
Browse files

sma: interface for querying QoS capabilities



Signed-off-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I6013205499c122cad95d807c84e609f188b4d2d2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14189


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent f14c7d75
Loading
Loading
Loading
Loading
+41 −1
Original line number Diff line number Diff line
@@ -13,6 +13,14 @@ package 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
message VolumeCryptoParameters {
  // 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
  // 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).
  // (volume_id cannot be empty).  This information can be obtained by sending a
  // GetQosCapabilities request.
  bytes volume_id = 2;
  // Maximum allowed IOPS/bandwidth
  QosLimit maximum = 3;
@@ -129,6 +138,34 @@ message SetQosRequest {
// SetQos response
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
service StorageManagementAgent {
  // 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
  rpc SetQos (SetQosRequest)
    returns (SetQosResponse) {}
  // Returns QoS capabilities of a given device type
  rpc GetQosCapabilities (GetQosCapabilitiesRequest)
    returns (GetQosCapabilitiesResponse) {}
}