如何修复 DPDK 错误 'MBUF: error setting mempool handler'
How to fix DPDK error 'MBUF: error setting mempool handler'
我正在使用一些适用于 DPDK 2.2.0 的 DPDK 应用程序代码。我正在尝试将它移植到 Centos 7 上的 DPDK 18.08 运行。代码给出错误:
MBUF: error setting mempool handler
此错误发生在下面对 rte_pktmbuf_pool_create() 的调用中:
for (lcore_id = 0; lcore_id < RTE_MAX_LCORE; lcore_id++) {
if (rte_lcore_is_enabled(lcore_id) == 0)
continue;
iCpuSocket = rte_lcore_to_socket_id(lcore_id);
if (iCpuSocket == SOCKET_ID_ANY)
iCpuSocket = 0;
// Preparing direct memory pool per Socket
if (socket_direct_pool[iCpuSocket] == NULL)
{
mp = rte_pktmbuf_pool_create( buf,
NB_MBUF,
32,
0,
RTE_MBUF_DEFAULT_BUF_SIZE,
iCpuSocket);
if (mp == NULL) {
<print error>
return -1;
}
socket_direct_pool[iCpuSocket] = mp;
}
我不知道如何解决这个问题。我看到其他人在将 dpdk 应用程序代码构建为库时报告了这一点(即缺少符号),但我直接构建为可执行文件。
有什么建议吗?
根据评论和聊天互动,问题的根本原因是 have aligned the library link order of my app with that of l2fwd and the rte_pktmbuf_pool_create() error is fixed. Thanks for pointing me to l2fwd and for bearing with me.
也就是说,问题似乎解决了
- 链接到 RTE_SDK & RTE_TARGET
- 修改应用程序以使用类似于 example/l2fwd
的语义
对于未找到 VFIO 的警告,可以忽略它,因为使用的驱动程序是 igb_uio 而不是物理接口的 VFIO-PCI。
我正在使用一些适用于 DPDK 2.2.0 的 DPDK 应用程序代码。我正在尝试将它移植到 Centos 7 上的 DPDK 18.08 运行。代码给出错误:
MBUF: error setting mempool handler
此错误发生在下面对 rte_pktmbuf_pool_create() 的调用中:
for (lcore_id = 0; lcore_id < RTE_MAX_LCORE; lcore_id++) {
if (rte_lcore_is_enabled(lcore_id) == 0)
continue;
iCpuSocket = rte_lcore_to_socket_id(lcore_id);
if (iCpuSocket == SOCKET_ID_ANY)
iCpuSocket = 0;
// Preparing direct memory pool per Socket
if (socket_direct_pool[iCpuSocket] == NULL)
{
mp = rte_pktmbuf_pool_create( buf,
NB_MBUF,
32,
0,
RTE_MBUF_DEFAULT_BUF_SIZE,
iCpuSocket);
if (mp == NULL) {
<print error>
return -1;
}
socket_direct_pool[iCpuSocket] = mp;
}
我不知道如何解决这个问题。我看到其他人在将 dpdk 应用程序代码构建为库时报告了这一点(即缺少符号),但我直接构建为可执行文件。
有什么建议吗?
根据评论和聊天互动,问题的根本原因是 have aligned the library link order of my app with that of l2fwd and the rte_pktmbuf_pool_create() error is fixed. Thanks for pointing me to l2fwd and for bearing with me.
也就是说,问题似乎解决了
- 链接到 RTE_SDK & RTE_TARGET
- 修改应用程序以使用类似于 example/l2fwd 的语义
对于未找到 VFIO 的警告,可以忽略它,因为使用的驱动程序是 igb_uio 而不是物理接口的 VFIO-PCI。