UNH-IOL Reservation 一致性测试用例【9】- Reservation Notification Log Page(LID 0x80)

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.9 – Reservation Notification Log Page (FYI, OF-FYI)

Reservation Notification log page 按发生时间顺序排列报告 reservation notification log pages(如果有)。每当 Controller 上的任何 namespace 发生未屏蔽的 reservation notification 时,都会创建一个新的 Reservation Notification log page,并添加到 reservation notifications 队列的末尾。Get Log Page Reservation Notification:

  • 返回一个 data buffer,其中包含一个 log page,该 log page 与 reservation notification 队列中最旧的 log page(即包含最低 Log Page Count 字段的 log page;考虑到环绕)相对应;
  • 从队列中删除该 Reservation Notification log page。

如果在发出 Get Log Page 命令时没有可用的 Reservation Notification log page 条目,则将返回一个空 log page(即 log page 中的所有字段均清为 0h)。

Case 1: Retrieve Log (FYI, OF-FYI)

测试步骤
  1. 检查 Identify controller data structure(CNS 01) ONCS 字段确定 controller 是否支持 reservation;检查DUT当前是否为多个ports
  2. 在 DUT 上配置两个 Hosts ( Controllers), 为这两个 hosts 创建一个 shared namespace。
  3. 针对 NVMe Subsystem 里的每个 NVMe Controller:
    1. NVMe Host 向 Controller 发出 Set Features Host Identifier, 以便为该 Controller 注册一个 Host Identifier
    2. 对于 atttach 到该 Controller 的每个 shared namespace:
      1. 至少两个 Hosts 发 Reservation Register 命令,Register Action (RREGA) 字段设为 000b (即. Register Reservation Key),在 New Reservation Key (NRKEY) 字段中向 namesapce 的 NVMe Controller 提供 reservation key,以使 host 成为该 shared namespace 的 registrant。
      2. 一个是 registrant 的 Host 发出 Reservation Acquire 命令,将 Reservation Acquire Action (RACQA) 字段设为 000b (Acquire),向 Current Reservation Key (CRKEY) 字段提供当前 Host 的 reservation key,并将 Reservation Type (RTYPE) 字段设为 namespace 支持的 Write Exclusive 或 Exclusive Access,以便 host 在 namespace 获取该 reservation 类型的 reservation
      3. 相同的 Host 发送 Reservation Release 命令来清除 reservation,其中 Reservation Release Action (RRELA) 字段设为 000b (Release),Current Reservation Key (CRKEY) 字段设为 host 当前的 reservation key
      4. 相同的 Host 向 Controller 发送 Reservation Report 命令。
  4. 执行 Reservation Release 命令,将所有现有 reservations 的 RRELA 字段设置为 001b(清除)。Reservation release 命令将生成 Reservation Notification。
  5. 第二次重复步骤 1-3。
  6. Get Reservation Notification Log Page
预期结果

验证 Reservation Notification Log Page 返回的内容:

  1. Log Page Count 为 2
  2. Log Page Type 为 2(Reservation Released)
  3. Number of Available Log Pages 为 1
  4. Namespace ID 正确

Case 2: Empty Log (FYI, OF-FYI)

测试步骤
  1. 检查 Identify controller data structure(CNS 01) ONCS 字段确定 controller 是否支持 reservation;检查DUT当前是否为多个ports
  2. 在 DUT 上配置两个 Hosts ( Controllers), 为这两个 hosts 创建一个 shared namespace。
  3. 针对 NVMe Subsystem 里的每个 NVMe Controller:
    1. NVMe Host 向 Controller 发出 Set Features Host Identifier, 以便为该 Controller 注册一个 Host Identifier
    2. 对于 atttach 到该 Controller 的每个 shared namespace:
      1. Hosts 发 Reservation Register 命令,Register Action (RREGA) 字段设为 000b (即. Register Reservation Key),在 New Reservation Key (NRKEY) 字段中向 namesapce 的 NVMe Controller 提供 reservation key,以使 host 成为该 shared namespace 的 registrant。
      2. 一个是 registrant 的 Host 发出 Reservation Acquire 命令,将 Reservation Acquire Action (RACQA) 字段设为 000b (Acquire),向 Current Reservation Key (CRKEY) 字段提供当前 Host 的 reservation key,并将 Reservation Type (RTYPE) 字段设为 namespace 支持的 reservation 类型,以便 host 在 namespace 获取该 reservation 类型的 reservation
      3. 相同的 Host 发送 Reservation Release 命令来释放 reservation,其中 Reservation Release Action (RRELA) 字段设为 000b (Release),Current Reservation Key (CRKEY) 字段设为 host 当前的 reservation key
      4. 相同的 Host 向 Controller 发送 Reservation Report 命令。
  4. 执行 Reservation Release 命令,将所有现有 reservations 的 RRELA 字段设置为 001b(清除)。Reservation release 命令将生成 Reservation Notification。
  5. Get Reservation Notification Log Page
  6. Get Reservation Notification Log Page
预期结果

验证第二笔get log page 返回全0字段

Case 3: Wrapped Log Count (FYI, OF-FYI)

测试步骤
  1. 检查 Identify controller data structure(CNS 01) ONCS 字段确定 controller 是否支持 reservation;检查DUT当前是否为多个ports
  2. 在 DUT 上配置两个 Hosts ( Controllers), 为这两个 hosts 创建一个 shared namespace。
  3. 针对 NVMe Subsystem 里的每个 NVMe Controller:
    1. NVMe Host 向 Controller 发出 Set Features Host Identifier, 以便为该 Controller 注册一个 Host Identifier
    2. 对于 atttach 到该 Controller 的每个 shared namespace:
      1. Hosts 发 Reservation Register 命令,Register Action (RREGA) 字段设为 000b (即. Register Reservation Key),在 New Reservation Key (NRKEY) 字段中向 namesapce 的 NVMe Controller 提供 reservation key,以使 host 成为该 shared namespace 的 registrant。
      2. 一个是 registrant 的 Host 发出 Reservation Acquire 命令,将 Reservation Acquire Action (RACQA) 字段设为 000b (Acquire),向 Current Reservation Key (CRKEY) 字段提供当前 Host 的 reservation key,并将 Reservation Type (RTYPE) 字段设为 namespace 支持的 reservation 类型,以便 host 在 namespace 获取该 reservation 类型的 reservation
      3. 相同的 Host 发送 Reservation Release 命令来释放 reservation,其中 Reservation Release Action (RRELA) 字段设为 000b (Release),Current Reservation Key (CRKEY) 字段设为 host 当前的 reservation key
      4. 相同的 Host 向 Controller 发送 Reservation Report 命令。
  4. 执行 Reservation Release 命令,将所有现有 reservations 的 RRELA 字段设置为 001b(清除)。Reservation release 命令将生成 Reservation Notification。
  5. 重复步骤 1-3 1000遍 直到出现 Reservation Notification Log Queue 环绕
  6. Get Reservation Notification Log Page
预期结果

如果 log page count 出现了环绕,下次增加会滚动至 1,否则就是正常增加。

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值