DPDK中RX描述符数的设置是否有限制?

发布于 2025-02-08 00:48:19 字数 152 浏览 1 评论 0原文

我注意到在DPDK中,RX环中RX描述符的默认值通常为4096。但是我也可以对此值进行任意更改(64的倍数)。

我想知道设置RX描述符的数量是否有限制?

例如,可以设置的RX描述符的最大数量是多少?此最大值与网卡类型有关? RX描述符的数量是否必须为64?的倍数

I noticed that in DPDK, the default value of the RX descriptors in the RX ring is generally 4096. But I can also make arbitrary changes to this value(multiples of 64).

I would like to know is there any limit for setting the number of RX descriptors?

eg,What is the maximum number of RX descriptors that can be set?Is this maximum value related to the type of network card? Does the number of RX descriptors have to be a multiple of 64?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

绝不服输 2025-02-15 00:48:19

描述符计数限制是PMD特定的,但是该应用程序可以通过

可用值是:最小,最大和对齐(乘数)。例如,对于RX描述符数:

uint16_t                 port_id = 0;
struct rte_eth_dev_info  info = {};
int                      ret;

ret = rte_eth_dev_info_get(port_id, &info);
if (ret != 0) {
    /* handle the error */
}

/*
 * Use these variables to compute a valid descriptor
 * count for the use in rte_eth_rx_queue_setup():
 *
 * info.rx_desc_lim.nb_min
 * info.rx_desc_lim.nb_align
 * info.rx_desc_lim.nb_max
 */

Descriptor count limits are PMD-specific, but the application can get them via the generic interface.

Available values are: MIN, MAX and ALIGN (multiplier). In example, for the Rx descriptor count:

uint16_t                 port_id = 0;
struct rte_eth_dev_info  info = {};
int                      ret;

ret = rte_eth_dev_info_get(port_id, &info);
if (ret != 0) {
    /* handle the error */
}

/*
 * Use these variables to compute a valid descriptor
 * count for the use in rte_eth_rx_queue_setup():
 *
 * info.rx_desc_lim.nb_min
 * info.rx_desc_lim.nb_align
 * info.rx_desc_lim.nb_max
 */
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文