已合并
[fix] 新增GetSingleLocBufferUniqueId,区分本地与远端buffer的uniqueId生成 #4622
zhengjinwei_y创建于 6 天前
[fix] 新增GetSingleLocBufferUniqueId,区分本地与远端buffer的uniqueId生成 #4622
已合并
Pull Request已成功合入, 合并人@CANN-robot
(感谢 zhengjinwei_y 的贡献)6 天前 创建了 pull request,commit 67a29a8c
atomgit-bot
6 天前 评论:
6 天前 评论:
变更摘要
本 PR 主要修复本地 buffer 与远端 buffer 复用同一 uniqueId 生成逻辑导致的语义不清问题。此前 GetLocBufferUniqueIds 通过复用 GetSingleRmtBufferUniqueId 并传入 UINT32_MAX 作为 notifyId 哨兵值来生成本地 buffer 的 uniqueId,混入了本地 buffer 并不存在的远端字段。此次改动新增独立的 GetSingleLocBufferUniqueId(addr, size, tokenId, tokenValue) 方法,仅序列化本地 buffer 所需的 4 个字段(不含 notifyId),并在 UbMemTransport 与 AicpuTsUboeUbgChannelHelper 两处落地,使本地与远端 buffer 的 uniqueId 生成逻辑相互独立。
主要改动
- 新增
GetSingleLocBufferUniqueId方法: 在UbMemTransport与AicpuTsUboeUbgChannelHelper中分别新增该方法,使用BinaryStream依次序列化addr、size、tokenId、tokenValue四个字段,不再包含notifyId。 - 修改
GetLocBufferUniqueIds的本地 buffer 生成逻辑: 将本地 buffer 的 uniqueId 由复用GetSingleRmtBufferUniqueId(..., UINT32_MAX)改为调用新增的GetSingleLocBufferUniqueId,空 buffer 由GetSingleLocBufferUniqueId(0, 0, 0, 0)填充。 - 同步更新头文件声明: 在
ub_mem_transport.h与aicpu_ts_uboe_ubg_channel_helper.h中新增GetSingleLocBufferUniqueId的声明。 - 更新 UT stub: 在
llt_next_orion_stub.cc中新增UbMemTransport::GetSingleLocBufferUniqueId的桩实现,返回空的std::vector<char>,保证 UT 编译通过。


atomgit-bot
6 天前 评论:
6 天前 评论:
zhengjinwei_y
6 天前 评论:
6 天前 评论:
/compile


Zzhengjinwei_y
6 天前 update merge request[project id: 7874083, iid: 4622, commit_id: 551f8961768369976a5574a2130afb9995ff49a0] virtual merging success
6 天前 update merge request[project id: 7874083, iid: 4622, commit_id: 551f8961768369976a5574a2130afb9995ff49a0] virtual merging success
此处折叠了181条消息 查看更多
temper7620
3 天前 评论:
3 天前 评论:
/approve


57_Viking
3 天前 评论:
3 天前 评论:
/approve


3 天前 添加了label:lgtmapproved
3 天前 合入了pull request
描述
简要描述
问题描述
解决方案
影响范围
新增用例
变更类型
请选择本次引入的变更类型:
关联的Issue
NA
测试
已完成的测试用例和场景:
llt_next_orion_stub.cc:新增GetSingleLocBufferUniqueId桩实现,保证 UT 编译通过GetLocBufferUniqueIds改用GetSingleLocBufferUniqueId,验证本地 buffer uniqueId 序列化字段与远端区分补充的UT用例:
GetSingleLocBufferUniqueId输出字段顺序与内容校验用例文档更新
无
合入检查
/lgtm前的必要检查[fix])/approve,正式合入前的必要检查