如何动态修改Connectx-6 Infiniband/VPI适配器中的QP速率限制

发布于 2025-02-09 10:03:40 字数 585 浏览 2 评论 0原文

我有一个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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

沙与沫 2025-02-16 10:03:40

rate_limit属性在KBPS中。我怀疑100 kbps对于设备无法处理的限制太低(原始static_rate接口只能降低到1倍单个数据速率,即2.5 Gbpps)。您可以使用

ibv_query_device_ex(context, &device_attr)

API​​检查并确保所请求的费率限制是在

device_attr.packet_pacing_caps.qp_rate_limit_min

device_attr.packet_pacing_caps.qp_rate_limit_max

The rate_limit attribute is in Kbps. I suspect 100 Kbps is too low a limit for the device to handle (the original static_rate interface can only go down to 1X single data rate, which is 2.5 Gbps). You can check by using the

ibv_query_device_ex(context, &device_attr)

API and making sure your requested rate limit is between

device_attr.packet_pacing_caps.qp_rate_limit_min

and

device_attr.packet_pacing_caps.qp_rate_limit_max
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文