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 的命令成功

注意事项

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

相关推荐
稳联技术7 小时前
汽车焊机数据通信: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有线通信标准在汽车制造中至关重要
汽车·制造