Spdk/proto/nvmf.proto

36 lines
1.1 KiB
Protocol Buffer
Raw Permalink Normal View History

sma: initial Storage Management Agent structures Storage Management Agent is a gRPC server that provides an abstraction layer above the SPDK RPC interface. The interface aims to provide a set of methods for managing various protocols (e.g. NVMe, virtio-blk) while hiding the details of a particular transport. The external API is defined by `lib/python/spdk/sma/proto/sma.proto` protobuf file. It defines the generic gRPC service methods and their requests/responses. Device-specific messages are defined in their own files. This patch also defines messages for creating NVMe and NVMe/TCP devices. This patch implements a gRPC service that delegates the work to a specific device type. A DeviceManager is a class that implements some of the methods defined by the service for a given type of devices (e.g. NVMe, virtio-blk, NVMe/TCP, etc.). For now, only the RPC for creating a device is implemented, others are added in subsequent patches. The series implements the generic calls as well as their NVMe/TCP implementation. Support for other devce types could be easily added by creating a new device manager and defining its protobuf parameter definition. Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com> Change-Id: I17cde3b31d3514878f1027cfcd112b48848f6123 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10273 Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
2022-01-05 09:32:09 +00:00
syntax = "proto3";
package sma.nvmf;
option go_package = "spdk.io/sma/nvmf";
// Defines an address of an NVMeoF endpoint
message Address {
// Transport type ("rdma" or "tcp")
string trtype = 1;
// Transport address (IP)
string traddr = 2;
// Transport service identifier (port number)
string trsvcid = 3;
}
// NVMeoF connection using discovery service
message VolumeDiscoveryParameters {
// One or more discovery endpoints
repeated Address discovery_endpoints = 1;
}
// Describes connection parameters for an NVMeoF volume (namespace)
message VolumeConnectionParameters {
// Subsystem that the volume is exposed through. A volume with a given
// GUID/UUID won't be created if it's attached to a different subsystem. This
// field is optional and can be left empty.
string subnqn = 1;
// Host NQN to use when connecting to the subsystem exposing the volume (and,
// if using discovery, to the discovery subsystem too).
string hostnqn = 2;
oneof connection_params {
// Connection through discovery service
VolumeDiscoveryParameters discovery = 3;
}
}