Repository navigation
Add business QoS configuration for RDMA and URMA - #93
Draft
Spicy-cream wants to merge 4 commits into
Draft
Spicy-cream wants to merge 4 commits into
Spicy-cream wants to merge 4 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
RDMA 的 SL 和 Traffic Class 固定为 0,URMA 的 Jetty priority 在进程内统一选择,业务无法分别配置发送策略。本 PR 增加 Channel 和 Server 级 QoS:客户端控制请求发送方向,服务端控制响应发送方向。
RdmaQosOptions 提供 service_level 0–15 和 traffic_class 0–255,默认均为 0,应用到 QP RTR 地址属性。UrmaQosOptions 增加 service_level,默认为 -1(不指定),显式范围 0–255;priority 默认为 -1,显式范围 0–15。当前 URMA 路径为 RM+CTP,指定 SL 时从设备 priority_info 中选择首个同时匹配 SL 和 CTP 能力的 priority。两项同时指定时必须满足同一设备映射。SL 不支持或配置冲突时,Channel 初始化和 Server 启动报错,并列出支持的 priority:SL。两项均未指定时保留原自动选择行为。
SL 与 priority 一起纳入连接签名,继承到直连、服务发现、连接池、短连接和服务端 accept 路径。预建 Jetty 只用于匹配解析后 priority 的连接,其他 priority 按需创建。v2/v3 握手格式沿用现有协议。初始化、完成错误和连接调试信息显示默认或请求 SL/priority、Jetty priority 与映射 SL。设备全局映射由平台配置;brpc 使用初始化时读取的设备映射,平台修改后重启进程加载。
URMA 性能示例增加 urma_sl,保留 urma_priority;RDMA 示例提供 rdma_sl、rdma_traffic_class。中英文文档补充业务 SL 配置、不支持与冲突场景,以及原生预检、单流对照和竞争流量验证步骤。
WSL Ubuntu 下生产静态库、RDMA 和 URMA 性能示例构建通过。Channel 87 项、RDMA mock 95 项、URMA mock 26 项测试通过,共 208 项。12 项 URMA QoS 测试通过随机顺序验证,覆盖非同值 SL/priority 映射、RTP-only SL 拒绝、重复映射选择、范围与冲突检查、连接隔离和继承、预建池选择、错误诊断,以及 v2/v3 请求响应和服务端重启后的 Jetty 属性。示例不支持 SL、越界值和冲突配置拒绝、TCP RPC 兼容检查通过。URMA 单独启用时 endpoint/helper、关闭两种传输时公开配置头文件通过 C++14 编译。
已有设备样本仅 priority 6→SL 6、priority 7→SL 7 支持 CTP。node2/node3 使用 udmac0d1e2 的原生 inline SEND 已完成 1000 次交换,两端退出码为 0。PR93 业务 SL 的实机验证、报文标记与竞争流量调度效果仍待验证。