如何动态修改Connectx-6 Infiniband/VPI适配器中的QP速率限制
我有一个Connectx-6 Infiniband/VPI适配器。创建这样的QP时,我可以设置硬件速率限制:
...
ibv_qp_attr.ah_attr.static_rate = 7; // set qp rate limit to 40Gbps
...
ibv_modify_qp(qp, &ibv_qp_attr, flags);
...
但是在创建QP后,我无法使用上述代码动态更改QP速率限制。
我还检查了ibv_modify_qp_rate_limit()
api,但是当我尝试使用此API设置速率限制时,它会保持返回einval:
struct ibv_qp_rate_limit_attr rl_attr;
memset(&rl_attr, 0, sizeof(rl_attr));
rl_attr.rate_limit = 100;
ibv_modify_qp_rate_limit(qp, &rl_attr); // returns EINVAL
我是否使用API对吗?如何动态更改QP的硬件速率限制? (或设置全局硬件速率限制)。
I have a ConnectX-6 Infiniband/VPI Adapter. I can setup the hardware rate limit when creating a qp like this:
...
ibv_qp_attr.ah_attr.static_rate = 7; // set qp rate limit to 40Gbps
...
ibv_modify_qp(qp, &ibv_qp_attr, flags);
...
But I cannot dynamically change the qp rate limit later using the above code after creating the qp.
I also checked the ibv_modify_qp_rate_limit()
API, but it keeps return EINVAL when I try to set the rate limit using this API:
struct ibv_qp_rate_limit_attr rl_attr;
memset(&rl_attr, 0, sizeof(rl_attr));
rl_attr.rate_limit = 100;
ibv_modify_qp_rate_limit(qp, &rl_attr); // returns EINVAL
Am I using the API right? How can I dynamically change the hardware rate limit of a qp? (or set the global hardware rate limit).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
rate_limit
属性在KBPS中。我怀疑100 kbps对于设备无法处理的限制太低(原始static_rate
接口只能降低到1倍单个数据速率,即2.5 Gbpps)。您可以使用API检查并确保所请求的费率限制是在
和
The
rate_limit
attribute is in Kbps. I suspect 100 Kbps is too low a limit for the device to handle (the originalstatic_rate
interface can only go down to 1X single data rate, which is 2.5 Gbps). You can check by using theAPI and making sure your requested rate limit is between
and