[PATCH 5/8] nvme-sysfs: add 'tls_configured_key' sysfs attribute
Hannes Reinecke
hare at suse.de
Thu Jul 18 23:29:04 PDT 2024
On 7/19/24 07:44, Christoph Hellwig wrote:
>> #ifdef CONFIG_NVME_TCP_TLS
>> &dev_attr_tls_key.attr,
>> + &dev_attr_tls_configured_key.attr,
>> #endif
>> &dev_attr_adm_passthru_err_log_enabled.attr,
>> NULL
>> @@ -741,6 +752,10 @@ static umode_t nvme_dev_attrs_are_visible(struct kobject *kobj,
>> if (a == &dev_attr_tls_key.attr &&
>> (!ctrl->opts || strcmp(ctrl->opts->transport, "tcp")))
>> return 0;
>> + if (a == &dev_attr_tls_configured_key.attr &&
>> + (!ctrl->opts || !ctrl->opts->tls_key ||
>> + strcmp(ctrl->opts->transport, "tcp")))
>> + return 0;
>> #endif
>
> The check for a specific transport hack was ok for a single attribute,
> but it probably is time to have a separate attribute_group provided
> by the transport now. Or maybe wait until we get another one..
>
Not a bad idea. Will be doing that for the next round.
Cheers,
Hannes
--
Dr. Hannes Reinecke Kernel Storage Architect
hare at suse.de +49 911 74053 688
SUSE Software Solutions GmbH, Frankenstr. 146, 90461 Nürnberg
HRB 36809 (AG Nürnberg), GF: I. Totev, A. McDonald, W. Knoblich
More information about the Linux-nvme
mailing list