@@ -37,11 +37,14 @@ service Gateway {
3737 rpc namespace_add (namespace_add_req ) returns (nsid_status ) {}
3838
3939 // Creates a subsystem
40- rpc create_subsystem (create_subsystem_req ) returns (req_status ) {}
40+ rpc create_subsystem (create_subsystem_req ) returns (subsys_status ) {}
4141
4242 // Deletes a subsystem
4343 rpc delete_subsystem (delete_subsystem_req ) returns (req_status ) {}
4444
45+ // Changes subsystem key
46+ rpc change_subsystem_key (change_subsystem_key_req ) returns (req_status ) {}
47+
4548 // List namespaces
4649 rpc list_namespaces (list_namespaces_req ) returns (namespaces_info ) {}
4750
@@ -57,15 +60,30 @@ service Gateway {
5760 // Changes namespace's load balancing group
5861 rpc namespace_change_load_balancing_group (namespace_change_load_balancing_group_req ) returns (req_status ) {}
5962
63+ // Changes namespace's visibility
64+ rpc namespace_change_visibility (namespace_change_visibility_req ) returns (req_status ) {}
65+
66+ // Set namespace's RBD trash image flag
67+ rpc namespace_set_rbd_trash_image (namespace_set_rbd_trash_image_req ) returns (req_status ) {}
68+
6069 // Deletes a namespace
6170 rpc namespace_delete (namespace_delete_req ) returns (req_status ) {}
6271
72+ // Adds a host to a namespace
73+ rpc namespace_add_host (namespace_add_host_req ) returns (req_status ) {}
74+
75+ // Deletes a host from a namespace
76+ rpc namespace_delete_host (namespace_delete_host_req ) returns (req_status ) {}
77+
6378 // Adds a host to a subsystem
6479 rpc add_host (add_host_req ) returns (req_status ) {}
6580
6681 // Removes a host from a subsystem
6782 rpc remove_host (remove_host_req ) returns (req_status ) {}
6883
84+ // Changes a host inband authentication keys
85+ rpc change_host_key (change_host_key_req ) returns (req_status ) {}
86+
6987 // List hosts
7088 rpc list_hosts (list_hosts_req ) returns (hosts_info ) {}
7189
@@ -107,6 +125,9 @@ service Gateway {
107125
108126 // Set gateway log level
109127 rpc set_gateway_log_level (set_gateway_log_level_req ) returns (req_status ) {}
128+
129+ // Show gateway listeners info
130+ rpc show_gateway_listeners_info (show_gateway_listeners_info_req ) returns (gateway_listeners_info ) {}
110131}
111132
112133// Request messages
@@ -122,25 +143,27 @@ message namespace_add_req {
122143 optional bool create_image = 8 ;
123144 optional uint64 size = 9 ;
124145 optional bool force = 10 ;
146+ optional bool no_auto_visible = 11 ;
147+ optional bool trash_image = 12 ;
125148}
126149
127150message namespace_resize_req {
128151 string subsystem_nqn = 1 ;
129- optional uint32 nsid = 2 ;
130- optional string uuid = 3 ;
152+ uint32 nsid = 2 ;
153+ optional string OBSOLETE_uuid = 3 ;
131154 uint64 new_size = 4 ;
132155}
133156
134157message namespace_get_io_stats_req {
135158 string subsystem_nqn = 1 ;
136- optional uint32 nsid = 2 ;
137- optional string uuid = 3 ;
159+ uint32 nsid = 2 ;
160+ optional string OBSOLETE_uuid = 3 ;
138161}
139162
140163message namespace_set_qos_req {
141164 string subsystem_nqn = 1 ;
142- optional uint32 nsid = 2 ;
143- optional string uuid = 3 ;
165+ uint32 nsid = 2 ;
166+ optional string OBSOLETE_uuid = 3 ;
144167 optional uint64 rw_ios_per_second = 4 ;
145168 optional uint64 rw_mbytes_per_second = 5 ;
146169 optional uint64 r_mbytes_per_second = 6 ;
@@ -149,29 +172,63 @@ message namespace_set_qos_req {
149172
150173message namespace_change_load_balancing_group_req {
151174 string subsystem_nqn = 1 ;
152- optional uint32 nsid = 2 ;
153- optional string uuid = 3 ;
175+ uint32 nsid = 2 ;
176+ optional string OBSOLETE_uuid = 3 ;
154177 int32 anagrpid = 4 ;
178+ optional bool auto_lb_logic = 5 ;
179+ }
180+
181+ message namespace_change_visibility_req {
182+ string subsystem_nqn = 1 ;
183+ uint32 nsid = 2 ;
184+ bool auto_visible = 3 ;
185+ optional bool force = 4 ;
186+ }
187+
188+ message namespace_set_rbd_trash_image_req {
189+ string subsystem_nqn = 1 ;
190+ uint32 nsid = 2 ;
191+ bool trash_image = 3 ;
155192}
156193
157194message namespace_delete_req {
158195 string subsystem_nqn = 1 ;
159- optional uint32 nsid = 2 ;
160- optional string uuid = 3 ;
196+ uint32 nsid = 2 ;
197+ optional string OBSOLETE_uuid = 3 ;
198+ optional bool i_am_sure = 4 ;
199+ }
200+
201+ message namespace_add_host_req {
202+ string subsystem_nqn = 1 ;
203+ uint32 nsid = 2 ;
204+ string host_nqn = 3 ;
205+ }
206+
207+ message namespace_delete_host_req {
208+ string subsystem_nqn = 1 ;
209+ uint32 nsid = 2 ;
210+ string host_nqn = 3 ;
161211}
162212
163213message create_subsystem_req {
164214 string subsystem_nqn = 1 ;
165215 string serial_number = 2 ;
166216 optional uint32 max_namespaces = 3 ;
167217 bool enable_ha = 4 ;
218+ optional bool no_group_append = 5 ;
219+ optional string dhchap_key = 6 ;
168220}
169221
170222message delete_subsystem_req {
171223 string subsystem_nqn = 1 ;
172224 optional bool force = 2 ;
173225}
174226
227+ message change_subsystem_key_req {
228+ string subsystem_nqn = 1 ;
229+ optional string dhchap_key = 2 ;
230+ }
231+
175232message list_namespaces_req {
176233 string subsystem = 1 ;
177234 optional uint32 nsid = 2 ;
@@ -181,6 +238,14 @@ message list_namespaces_req {
181238message add_host_req {
182239 string subsystem_nqn = 1 ;
183240 string host_nqn = 2 ;
241+ optional string psk = 3 ;
242+ optional string dhchap_key = 4 ;
243+ }
244+
245+ message change_host_key_req {
246+ string subsystem_nqn = 1 ;
247+ string host_nqn = 2 ;
248+ optional string dhchap_key = 3 ;
184249}
185250
186251message remove_host_req {
@@ -202,6 +267,7 @@ message create_listener_req {
202267 string traddr = 3 ;
203268 optional AddressFamily adrfam = 5 ;
204269 optional uint32 trsvcid = 6 ;
270+ optional bool secure = 7 ;
205271}
206272
207273message delete_listener_req {
@@ -247,6 +313,10 @@ message set_gateway_log_level_req {
247313 GwLogLevel log_level = 1 ;
248314}
249315
316+ message show_gateway_listeners_info_req {
317+ string subsystem_nqn = 1 ;
318+ }
319+
250320// From https://nvmexpress.org/wp-content/uploads/NVM-Express-1_4-2019.06.10-Ratified.pdf page 138
251321// Asymmetric Namespace Access state for all namespaces in this ANA
252322// Group when accessed through this controller.
@@ -285,6 +355,12 @@ message req_status {
285355 string error_message = 2 ;
286356}
287357
358+ message subsys_status {
359+ int32 status = 1 ;
360+ string error_message = 2 ;
361+ string nqn = 3 ;
362+ }
363+
288364message nsid_status {
289365 int32 status = 1 ;
290366 string error_message = 2 ;
@@ -307,6 +383,7 @@ message subsystem {
307383 optional uint32 min_cntlid = 9 ;
308384 optional uint32 max_cntlid = 10 ;
309385 repeated namespace namespaces = 11 ;
386+ optional bool has_dhchap_key = 12 ;
310387}
311388
312389message listen_address {
@@ -315,6 +392,7 @@ message listen_address {
315392 string traddr = 3 ;
316393 string trsvcid = 4 ;
317394 optional string transport = 5 ;
395+ optional bool secure = 6 ;
318396}
319397
320398message namespace {
@@ -325,6 +403,8 @@ message namespace {
325403 optional string uuid = 5 ;
326404 optional uint32 anagrpid = 6 ;
327405 optional string nonce = 7 ;
406+ optional bool auto_visible = 8 ;
407+ repeated string hosts = 9 ;
328408}
329409
330410message subsystems_info_cli {
@@ -343,6 +423,8 @@ message subsystem_cli {
343423 uint32 namespace_count = 7 ;
344424 string subtype = 8 ;
345425 uint32 max_namespaces = 9 ;
426+ optional bool has_dhchap_key = 10 ;
427+ optional bool allow_any_host = 11 ;
346428}
347429
348430message gateway_info {
@@ -358,6 +440,10 @@ message gateway_info {
358440 optional string spdk_version = 10 ;
359441 uint32 load_balancing_group = 11 ;
360442 string hostname = 12 ;
443+ optional uint32 max_subsystems = 13 ;
444+ optional uint32 max_namespaces = 14 ;
445+ optional uint32 max_hosts_per_subsystem = 15 ;
446+ optional uint32 max_namespaces_per_subsystem = 16 ;
361447}
362448
363449message cli_version {
@@ -378,6 +464,7 @@ message listener_info {
378464 AddressFamily adrfam = 3 ;
379465 string traddr = 4 ;
380466 uint32 trsvcid = 5 ;
467+ optional bool secure = 6 ;
381468}
382469
383470message listeners_info {
@@ -386,8 +473,21 @@ message listeners_info {
386473 repeated listener_info listeners = 3 ;
387474}
388475
476+ message gateway_listener_info {
477+ listener_info listener = 1 ;
478+ repeated ana_group_state lb_states = 2 ;
479+ }
480+
481+ message gateway_listeners_info {
482+ int32 status = 1 ;
483+ string error_message = 2 ;
484+ repeated gateway_listener_info gw_listeners = 3 ;
485+ }
486+
389487message host {
390- string nqn = 1 ;
488+ string nqn = 1 ;
489+ optional bool use_psk = 2 ;
490+ optional bool use_dhchap = 3 ;
391491}
392492
393493message hosts_info {
@@ -407,6 +507,9 @@ message connection {
407507 bool connected = 6 ;
408508 int32 qpairs_count = 7 ;
409509 int32 controller_id = 8 ;
510+ optional bool secure = 9 ;
511+ optional bool use_psk = 10 ;
512+ optional bool use_dhchap = 11 ;
410513}
411514
412515message connections_info {
@@ -429,6 +532,10 @@ message namespace_cli {
429532 uint64 rw_mbytes_per_second = 10 ;
430533 uint64 r_mbytes_per_second = 11 ;
431534 uint64 w_mbytes_per_second = 12 ;
535+ bool auto_visible = 13 ;
536+ repeated string hosts = 14 ;
537+ optional string ns_subsystem_nqn = 15 ;
538+ optional bool trash_image = 16 ;
432539}
433540
434541message namespaces_info {
@@ -438,12 +545,17 @@ message namespaces_info {
438545 repeated namespace_cli namespaces = 4 ;
439546}
440547
548+ message namespace_io_error {
549+ string name = 1 ;
550+ uint32 value = 2 ;
551+ }
552+
441553message namespace_io_stats_info {
442554 int32 status = 1 ;
443555 string error_message = 2 ;
444556 string subsystem_nqn = 3 ;
445557 uint32 nsid = 4 ;
446- string uuid = 5 ;
558+ optional string uuid = 5 ;
447559 string bdev_name = 6 ;
448560 uint64 tick_rate = 7 ;
449561 uint64 ticks = 8 ;
@@ -465,7 +577,7 @@ message namespace_io_stats_info {
465577 uint64 copy_latency_ticks = 24 ;
466578 uint64 max_copy_latency_ticks = 25 ;
467579 uint64 min_copy_latency_ticks = 26 ;
468- repeated uint32 io_error = 27 ;
580+ repeated namespace_io_error io_error = 27 ;
469581}
470582
471583message spdk_log_flag_info {
0 commit comments