[PATCH V3 5/7] nvmet: add passthru admin timeout value attr

Chaitanya Kulkarni Chaitanya.Kulkarni at wdc.com
Wed Sep 16 18:35:57 EDT 2020


On 9/16/20 00:12, Christoph Hellwig wrote:
> On Tue, Sep 15, 2020 at 02:51:16PM -0700, Chaitanya Kulkarni wrote:
>> NVMeOF controller in the passsthru mode is capable of handling wide set
>> of admin commands including Vender unique passhtru admin comands (VUAC).
> VUAC sounds like someone is throwing up and certainly is not NVMe
> terminology.   I also don't think we should care about stange verndor
> specific commands.  If we want to communicate command timeout we need

VUCs are Vendor unique NVMe commands. Given that passthru allows the 
wider range of feature and command sets it also needs to handle timeout
for VUCs to avoid getting stuck on over the fabrics.

> to add them to the command supported and effects log, similar to what
> SCSI does in REPORT SUPPORTED OPERATION CODES.
> 
I'm usually against polluting the configfs space.

If I understand correctly you are saying that user should read the 
command effects log and set the timeout per command for the
Passthru mode ?

Here is the detailed scenario :-

1. Vendor A has nvme-xxx admin cmd and nvme-yyy io cmd.
2. The command effects log page has timeout values for these VUCs.
    This value for VUC is larger than the default timeout values
    when the driver is loaded since these are not frequent commands
    e.g. flash-mgmt/Device RMA.
    User still wants to use the driver default timeout values but
    need an ability to override these values time to time on target
    side.
3. On the host side user reads the cmd-effect log and issues the
    passthru cmd ADMIN/IO IOCTL with timeout values from nvme-cli on
    NVMeOF target passthru controller.
4. Timeout value is applied on host side request in the driver :-
     nvme_handle_ctrl_ioctl()
     -NVME_IOCTL_ADMIN_CMD
     --nvme_user_cmd()
     ---nvme_submit_user_cmd()
     ----nvme_execute_passthru_rq()
     -----blk_execute_rq()

5. Now the target side we don't get the timeout value so it uses
    default admin timeout (ADMIN_TIMEOUT, given that we use the newly
    added nvme_default_timeout() helper) which is smaller than the
    timeout specified on the host side.
6. The target side request times out while host side request is
    intact due to default values used for pt-ctrl.

any thoughts ?



More information about the Linux-nvme mailing list