UNH-IOL Reservation 一致性测试用例【7】- 清除Reservation

Reservation 系列导航

UNH-IOL Reservation 一致性测试用例【1】- Reservation Report 命令验证
UNH-IOL Reservation 一致性测试用例【2】- Reservation注册
UNH-IOL Reservation 一致性测试用例【3】- 取消注册
UNH-IOL Reservation 一致性测试用例【4】- Reservation Acquire 验证
UNH-IOL Reservation 一致性测试用例【5】- Reservation Release
UNH-IOL Reservation 一致性测试用例【6】- 抢占 Reservation
UNH-IOL Reservation 一致性测试用例【7】- 清除Reservation
UNH-IOL Reservation 一致性测试用例【8】- 在不同 Reservation Types 下的命令行为
UNH-IOL Reservation 一致性测试用例【9】- Reservation Notification Log Page(LID 0x80)

Test 7.7 -- Clearing a Reservation (M, OF-FYI)

作为 Registrant 的 Host 可以通过执行一个 Reservation Release 命令来清除 reservation(强制解除对 namespace 的 reservation,并取消对所有 Registrants 的注册),其中 Reservation Release Action (RRELA) 字段设为 001b (Clear),Current Reservation Key (CRKEY) 字段设为 host 当前的 reservation key

清除 reservation 时,会发生以下原子操作:

  1. 释放 namespace 上的保留
  2. 所有 registrants 都从 namespace 中注销

Case 1: Basic Operation with Reservation Release Command (M, OF-FYI)

测试步骤

  1. 检查 Identify controller data structure(CNS 01) ONCS 字段确定 controller 是否支持 reservation
  2. 针对 NVMe Subsystem 里的每个 NVMe Controller:
    1. NVMe Host 向 Controller 发出 Set Features Host Identifier, 以便为该 Controller 注册一个 Host Identifier
    2. 对于 atttach 到该 Controller 的每个 active namespace:
      1. Host 发 Reservation Register 命令,Register Action (RREGA) 字段设为 000b (即. Register Reservation Key),在 New Reservation Key (NRKEY) 字段中向 namesapce 的 NVMe Controller 提供 reservation key,以使 host 成为该 namespace 的 registrant。
      2. Host 发出 Reservation Acquire 命令,将 Reservation Acquire Action (RACQA) 字段设为 000b (Acquire),向 Current Reservation Key (CRKEY) 字段提供当前的 reservation key,并将 Reservation Type (RTYPE) 字段设为支持的 reservation type,以便 host 在 namespace 获取该 reservation 类型的 reservation
      3. Host 发送 Reservation Release 命令来清除 reservation,其中 Reservation Release Action (RRELA) 字段设为 001b (Clear),Current Reservation Key (CRKEY) 字段设为 host 当前的 reservation key
      4. Host 向 Controller 发送 Reservation Report 命令。
        对所有 Reservation Controllers 执行 Reservation Release 命令,将 RRELA 字段设为 1(Clear)

预期结果

在 Reservation Report 完成后,检查 Reservation Status data structure, host 成功从该 namespace 取消注册,并不再持有 reservation

注意事项

在支持NVMe 2.0 或以上的版本的 driver 中,当要设置 Host Identifier 时,如果它在测试开始时是非零值,set feature 将被 abort,Status Code 为 Command Sequence Error

Case 2: Error Conditions (M, OF-FYI)

如果 CRKEY 值与 Host 向 namespace 注册时使用的 CRKEY 值不匹配,则应终止命令,状态为 Reservation Conflict。 Host 可通过将命令中的 Ignore Existing Key(IEKEY) 位置为 "1",在不考虑当前 reservation key 值的情况下清除 reservation。

果 Host 不是 Registrant,则应终止该命令,并显示 Reservation Conflict 状态。

测试步骤

  1. 检查 Identify controller data structure(CNS 01) ONCS 字段确定 controller 是否支持 reservation
  2. 针对 NVMe Subsystem 里的每个 NVMe Controller:
    1. NVMe Host 向 Controller 发出 Set Features Host Identifier, 以便为该 Controller 注册一个 Host Identifier
    2. 对于 atttach 到该 Controller 的每个 active namespace:
      1. Host 发送一个 Reservation Release 命令,Reservation Release Action (RRELA) 字段设为 001b (Clear),并提供一个随机的 reservation key 给 Current Reservation Key (CRKEY)。
      2. Host 发 Reservation Register 命令,Register Action (RREGA) 字段设为 000b (即. Register Reservation Key),在 New Reservation Key (NRKEY) 字段中向 namesapce 的 NVMe Controller 提供 reservation key,以使 host 成为该 namespace 的 registrant。
      3. Host 发送一个 Reservation Release 命令,Reservation Release Action (RRELA) 字段设为 001b (Clear),并提供一个不是 Host 当前的 reservation key 给 Current Reservation Key (CRKEY)。
      4. Host 向 Controller 发送 Reservation Report 命令。
      5. Host 发送一个 Reservation Release 命令,Reservation Release Action (RRELA) 字段设为 001b (Clear),提供一个不是 Host 当前的 reservation key 给 Current Reservation Key (CRKEY),将 IEKEY 置为 1。
      6. Host 向 Controller 发送 Reservation Report 命令。

预期结果

  1. 2.2.1 的 Reservation Release 命令失败,返回状态 Reservation Conflict
  2. 2.2.3 的 Reservation Release 命令失败,返回状态 Reservation Conflict
  3. 2.2.4 Reservation Report 返回的 Reservation Status data structure 表明:Host 依然是该 namespace 的 registrant
  4. 2.2.6 Reservation Report 返回的 Reservation Status data structure 表明:Host 不再是该 namespace 的 registrant,已成功取消注册

注意事项

  1. 在支持NVMe 2.0 或以上的版本的 driver 中,当要设置 Host Identifier 时,如果它在测试开始时是非零值,set feature 将被 abort,Status Code 为 Command Sequence Error
  2. 目前尚未确定进行此项检测的可靠方法。因此,这项测试不应纳入任何行业批准的一致性认定中。
相关推荐
稳联技术8 小时前
汽车焊机数据通信:Profinet转Canopen网关的神奇连接
服务器·网络·汽车
毕设木哥9 小时前
计算机专业毕业设计推荐-基于python的汽车汽修保养服务平台
大数据·python·计算机·django·汽车·毕业设计·课程设计
achirandliu9 小时前
汽车电子电气架构从12V提升至48V,带来那些好处? 包括那些改变?
架构·汽车·汽车电子电气架构·从12v升到48v
lupai10 小时前
盘点实用的几款汽车类接口?
大数据·人工智能·汽车
achirandliu10 小时前
汽车英文单词缩写汇总
汽车·汽车英文单词
Java追光着10 小时前
扣子智能体实战-汽车客服对话机器人(核心知识:知识库和卡片)
人工智能·机器人·汽车·智能体
车载诊断技术12 小时前
电子电气架构——中央计算的软件定义汽车架构
网络·架构·汽车·soa·电子电器架构
上海知从科技12 小时前
喜报 | 知从科技荣获 “AutoSec 安全之星 - 优秀汽车软件供应链安全方案奖”
科技·安全·汽车
亚远景aspice12 小时前
ISO 26262功能安全标准与汽车软件代码质量的关系探讨
安全·汽车
稳联技术12 小时前
Canopen-pn有线通信标准在汽车制造中至关重要
汽车·制造