UNH-IOL Reservation 一致性测试用例【8】- 在不同 Reservation Types 下的命令行为

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.8 -- Command Behavior with Different Reservation Types (M, OF-FYI)

NVMe 支持 6 种 Reservations:

  • Write Exclusive
  • Exclusive Access
  • Write Exclusive - Registrants Only
  • Exclusive Access - Registrants Only
  • Write Exclusive - All Registrants
  • Exclusive Access - All Registrants

这些 reservation 类型之间的区别在于:被排除的访问类型(即 writes 或 all accesses)、registrants 是否具有与 reservation holder 相同的访问权限,以及 registrants 是否也被视为 reservation holder。
就保留类型而言,以下命令被视为 NVM Read Command Group:

  • Read
  • Compare
  • Security Receive

以下命令被视为 NVM Write Command Group:

  • Write
  • Write Uncorrectable
  • Dataset Management
  • Flush
  • Format NVM
  • Namespace Attachment
  • Namespace Management
  • Security Send

Case 1: Write Exclusive (M, OF-FYI) Dual Port Devices Only

Write Exclusive reservation 禁止 registration holder 以外的任何 host 从 NVM Write Command Group 中发出命令。任何 Host 仍可执行 NVM Read Command Group 的任何命令。

该测试要求 NVM Subsystem 中至少有两个具有 shared namespace 的控制器。

测试步骤

  1. 检查 Identify controller data structure(CNS 01) ONCS 字段确定 controller 是否支持 reservation;检查DUT当前是否为多个ports
  2. NVMe Host 1 向 Controller 1 发出 Set Features Host Identifier, 以便为该 Controller 注册一个 Host Identifier
  3. NVMe Host 2 向 Controller 2 发出 Set Features Host Identifier, 为该 Controller 注册一个不同于 Host 1 的 Host Identifier
  4. Host 1 发 Reservation Register 命令,Register Action (RREGA) 字段设为 000b (即. Register Reservation Key),在 New Reservation Key (NRKEY) 字段中向 namesapce 的 NVMe Controller 1 提供 reservation key,以使 host 成为该 shared namespace 的 registrant。
  5. Host 1 发出 Reservation Acquire 命令,将 Reservation Acquire Action (RACQA) 字段设为 000b (Acquire),向 Current Reservation Key (CRKEY) 字段提供当前 Host 1 的 reservation key,并将 Reservation Type (RTYPE) 字段设为 Write Exclusive,以便 host 1 在 namespace 获取该 reservation 类型的 reservation
  6. 所有 Host 向 controller 发送上述 NVM Read Command Group 中的每条命令
  7. 所有 Host 向 controller 发送上述 NVM Write Command Group 中的每条命令
  8. Host 2 发 Reservation Register 命令,Register Action (RREGA) 字段设为 000b (即. Register Reservation Key),在 New Reservation Key (NRKEY) 字段中向 namesapce 的 NVMe Controller 2 提供 reservation key,以使 host 成为该 shared namespace 的 registrant
  9. Host 2 向各自的 controller 发送上述 NVM Read Command Group 中的每条命令
  10. Host 2 向各自的 controller 发送上述 NVM Write Command Group 中的每条命令
  11. 对所有 Reservation Controllers 执行 Reservation Release 命令,将 RRELA 字段设为 1(Clear)

预期结果

  1. 在每个命令完成后,控制器向相关的 Completion Queue 发布一个 completion queue entry,表明该命令的状态
  2. Host 1 在步骤 6,7 的命令成功
  3. Host 2 在步骤 6,9 的命令成功,步骤 7,10 的命令失败,返回状态 Reservation Conflict

Case 2: Exclusive Access (M, OF-FYI) Dual Port Devices Only

Exclusive Access reservation 禁止 registration holder 以外的任何 host 从 NVM Write Command Group 或 NVM Read Command Group 中发出命令。

该测试要求 NVM Subsystem 中至少有两个具有 shared namespace 的控制器。

测试步骤 1. 检查 Identify controller data structure(CNS 01) ONCS 字段确定 controller 是否支持 reservation;检查DUT当前是否为多个ports 2. NVMe Host 1 向 Controller 1 发出 Set Features Host Identifier, 以便为该 Controller 注册一个 Host Identifier 3. NVMe Host 2 向 Controller 2 发出 Set Features Host Identifier, 为该 Controller 注册一个不同于 Host 1 的 Host Identifier 4. Host 1 发 Reservation Register 命令,Register Action (RREGA) 字段设为 000b (即. Register Reservation Key),在 New Reservation Key (NRKEY) 字段中向 namesapce 的 NVMe Controller 1 提供 reservation key,以使 host 成为该 shared namespace 的 registrant。 5. Host 1 发出 Reservation Acquire 命令,将 Reservation Acquire Action (RACQA) 字段设为 000b (Acquire),向 Current Reservation Key (CRKEY) 字段提供当前 Host 1 的 reservation key,并将 Reservation Type (RTYPE) 字段设为 Exclusive Access,以便 host 1 在 namespace 获取该 reservation 类型的 reservation 6. 所有 Host 向 controller 发送上述 NVM Read Command Group 中的每条命令 7. 所有 Host 向 controller 发送上述 NVM Write Command Group 中的每条命令 8. Host 2 发 Reservation Register 命令,Register Action (RREGA) 字段设为 000b (即. Register Reservation Key),在 New Reservation Key (NRKEY) 字段中向 namesapce 的 NVMe Controller 2 提供 reservation key,以使 host 成为该 shared namespace 的 registrant 9. Host 2 向各自的 controller 发送上述 NVM Read Command Group 中的每条命令 10. Host 2 向各自的 controller 发送上述 NVM Write Command Group 中的每条命令 11. 对所有 Reservation Controllers 执行 Reservation Release 命令,将 RRELA 字段设为 1(Clear) #### 预期结果 1. 在每个命令完成后,控制器向相关的 Completion Queue 发布一个 completion queue entry,表明该命令的状态 2. Host 1 在步骤 6,7 的命令成功 3. Host 2 在步骤6,7, 9,10 的命令失败,返回状态 Reservation Conflict

Case 3: Write Exclusive - Registrants Only or Write Exclusive - All Registrants (M, OF-FYI) Dual Port Devices Only

Write Exclusive - Registrants Only 或 Write Exclusive - All Registrants reservation 不允许 namespace 的任何非注册者发 NVM Write Command Group 中的命令。所有 Host 仍可发 NVM Read Command Group 种的命令,namespace 的 registrants 仍可发 NVM Write Command Group 中的命令。

Write Exclusive - Registrants Only 和Write Exclusive - All Registrants reservation 类型的区别在于,Write Exclusive - All Registrants 类型的所有 registrants 也被视为 reservation holders。

该测试要求 NVM Subsystem 中至少有两个具有 shared namespace 的控制器。

测试步骤

  1. 检查 Identify controller data structure(CNS 01) ONCS 字段确定 controller 是否支持 reservation;检查DUT当前是否为多个ports
  2. NVMe Host 1 向 Controller 1 发出 Set Features Host Identifier, 以便为该 Controller 注册一个 Host Identifier
  3. NVMe Host 2 向 Controller 2 发出 Set Features Host Identifier, 为该 Controller 注册一个不同于 Host 1 的 Host Identifier
  4. Host 1 发 Reservation Register 命令,Register Action (RREGA) 字段设为 000b (即. Register Reservation Key),在 New Reservation Key (NRKEY) 字段中向 namesapce 的 NVMe Controller 1 提供 reservation key,以使 host 成为该 shared namespace 的 registrant。
  5. Host 1 发出 Reservation Acquire 命令,将 Reservation Acquire Action (RACQA) 字段设为 000b (Acquire),向 Current Reservation Key (CRKEY) 字段提供当前 Host 1 的 reservation key,并将 Reservation Type (RTYPE) 字段设为 Write Exclusive - Registrants Only 或 Write Exclusive - All Registrants,以便 host 1 在 namespace 获取该 reservation 类型的 reservation
  6. 所有 Host 向 controller 发送上述 NVM Read Command Group 中的每条命令
  7. 所有 Host 向 controller 发送上述 NVM Write Command Group 中的每条命令
  8. Host 2 发 Reservation Register 命令,Register Action (RREGA) 字段设为 000b (即. Register Reservation Key),在 New Reservation Key (NRKEY) 字段中向 namesapce 的 NVMe Controller 2 提供 reservation key,以使 host 成为该 shared namespace 的 registrant
  9. Host 2 向各自的 controller 发送上述 NVM Read Command Group 中的每条命令
  10. Host 2 向各自的 controller 发送上述 NVM Write Command Group 中的每条命令
  11. 对所有 Reservation Controllers 执行 Reservation Release 命令,将 RRELA 字段设为 1(Clear)

预期结果

  1. 在每个命令完成后,控制器向相关的 Completion Queue 发布一个 completion queue entry,表明该命令的状态
  2. Host 1 在步骤 6,7 的命令成功
  3. Host 2 在步骤 6 的命令成功,步骤 7 的命令失败,返回状态 Reservation Conflict
  4. Host 2 在步骤 9,10 的命令成功

Case 4: Exclusive Access - Registrants Only or Exclusive Access - All Registrants (M, OF-FYI) Dual Port Devices Only

Exclusive Access - Registrants Only 或 Exclusive Access - All Registrants reservation 不允许 namespace 的任何非注册者发 NVM Write Command Group 或 NVM Read Command Group 中的命令。Registrants 仍可发 NVM Read Command Group 和 NVM Write Command Group 中的命令。

Exclusive Access - Registrants Only 和 Exclusive Access - All Registrants reservation 类型的区别在于,Write Exclusive - All Registrants 类型的所有 registrants 也被视为 reservation holders。

该测试要求 NVM Subsystem 中至少有两个具有 shared namespace 的控制器。

测试步骤

  1. 检查 Identify controller data structure(CNS 01) ONCS 字段确定 controller 是否支持 reservation;检查DUT当前是否为多个ports
  2. NVMe Host 1 向 Controller 1 发出 Set Features Host Identifier, 以便为该 Controller 注册一个 Host Identifier
  3. NVMe Host 2 向 Controller 2 发出 Set Features Host Identifier, 为该 Controller 注册一个不同于 Host 1 的 Host Identifier
  4. Host 1 发 Reservation Register 命令,Register Action (RREGA) 字段设为 000b (即. Register Reservation Key),在 New Reservation Key (NRKEY) 字段中向 namesapce 的 NVMe Controller 1 提供 reservation key,以使 host 成为该 shared namespace 的 registrant。
  5. Host 1 发出 Reservation Acquire 命令,将 Reservation Acquire Action (RACQA) 字段设为 000b (Acquire),向 Current Reservation Key (CRKEY) 字段提供当前 Host 1 的 reservation key,并将 Reservation Type (RTYPE) 字段设为 Exclusive Access - Registrants Only 或 Exclusive Access - All Registrants,以便 host 1 在 namespace 获取该 reservation 类型的 reservation
  6. 所有 Host 向 controller 发送上述 NVM Read Command Group 中的每条命令
  7. 所有 Host 向 controller 发送上述 NVM Write Command Group 中的每条命令
  8. Host 2 发 Reservation Register 命令,Register Action (RREGA) 字段设为 000b (即. Register Reservation Key),在 New Reservation Key (NRKEY) 字段中向 namesapce 的 NVMe Controller 2 提供 reservation key,以使 host 成为该 shared namespace 的 registrant
  9. Host 2 向各自的 controller 发送上述 NVM Read Command Group 中的每条命令
  10. Host 2 向各自的 controller 发送上述 NVM Write Command Group 中的每条命令
  11. 对所有 Reservation Controllers 执行 Reservation Release 命令,将 RRELA 字段设为 1(Clear)

预期结果

  1. 在每个命令完成后,控制器向相关的 Completion Queue 发布一个 completion queue entry,表明该命令的状态
  2. Host 1 在步骤 6,7 的命令成功
  3. Host 2 在步骤 6 ,7 的命令失败,返回状态 Reservation Conflict
  4. Host 2 在步骤 9,10 的命令成功

注意事项

目前尚未确定进行此项检测的可靠方法。因此,这项测试不应纳入任何行业批准的一致性认定中。

相关推荐
星叔3 小时前
TC3xx中PFLASH缓存对XCP标定常量的影响
缓存·汽车·xcp
天天爱吃肉82187 小时前
新能源汽车电子架构革命:深度解析AUTOSAR标准与实践
架构·汽车·autosar
天天爱吃肉821812 小时前
《零基础读懂新能源汽车》——V2G/电池梯次利用/氢能源生态级技术拆解与商业预言
数据库·python·汽车·能源·创业创新
稳联技术14 小时前
实现无缝连接:EtherNet/IP转CANopen网关助力汽车制造智能化未来
tcp/ip·汽车·制造
成长之路51418 小时前
【面板数据】中国与世界各国新能源汽车进出口数据-分类别与不分类别(2017-2024年)
大数据·汽车
互联网杂货铺1 天前
如何使用Postman做接口自动化测试
自动化测试·软件测试·python·测试工具·测试用例·接口测试·postman
广州华锐视点1 天前
汽车生产虚拟实训中的技能提升与生产优化
汽车
农民也会写代码1 天前
国内 TOP5 汽车 PCB 厂家
汽车·制造·pcb工艺·pcb
深圳市尚想信息技术有限公司1 天前
三星MZQL2960HCJR-00BAL高性能固态硬盘控制器SSD云计算和高端存储专用 电子元器件解析
云计算·ssd·固态硬盘·主控芯片·三星
cooldream20091 天前
AI测试用例生成的基本流程与实践
人工智能·测试用例