@@ -132,6 +132,27 @@ static int nvmet_ctrl_host_traddr_show(struct seq_file *m, void *p)
132132}
133133NVMET_DEBUGFS_ATTR (nvmet_ctrl_host_traddr );
134134
135+ #ifdef CONFIG_NVME_TARGET_TCP_TLS
136+ static int nvmet_ctrl_tls_key_show (struct seq_file * m , void * p )
137+ {
138+ struct nvmet_ctrl * ctrl = m -> private ;
139+ key_serial_t keyid = nvmet_queue_tls_keyid (ctrl -> sqs [0 ]);
140+
141+ seq_printf (m , "%08x\n" , keyid );
142+ return 0 ;
143+ }
144+ NVMET_DEBUGFS_ATTR (nvmet_ctrl_tls_key );
145+
146+ static int nvmet_ctrl_tls_concat_show (struct seq_file * m , void * p )
147+ {
148+ struct nvmet_ctrl * ctrl = m -> private ;
149+
150+ seq_printf (m , "%d\n" , ctrl -> concat );
151+ return 0 ;
152+ }
153+ NVMET_DEBUGFS_ATTR (nvmet_ctrl_tls_concat );
154+ #endif
155+
135156int nvmet_debugfs_ctrl_setup (struct nvmet_ctrl * ctrl )
136157{
137158 char name [32 ];
@@ -157,6 +178,12 @@ int nvmet_debugfs_ctrl_setup(struct nvmet_ctrl *ctrl)
157178 & nvmet_ctrl_state_fops );
158179 debugfs_create_file ("host_traddr" , S_IRUSR , ctrl -> debugfs_dir , ctrl ,
159180 & nvmet_ctrl_host_traddr_fops );
181+ #ifdef CONFIG_NVME_TARGET_TCP_TLS
182+ debugfs_create_file ("tls_concat" , S_IRUSR , ctrl -> debugfs_dir , ctrl ,
183+ & nvmet_ctrl_tls_concat_fops );
184+ debugfs_create_file ("tls_key" , S_IRUSR , ctrl -> debugfs_dir , ctrl ,
185+ & nvmet_ctrl_tls_key_fops );
186+ #endif
160187 return 0 ;
161188}
162189
0 commit comments