Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to solve the problem that the application can not detect the port after DPDK is compiled into a dynamic library?

2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

This article shows you how to solve the problem that the application can not detect the port after DPDK is compiled into a dynamic library. The content is concise and easy to understand, which will definitely brighten your eyes. I hope you can get something through the detailed introduction of this article.

After changing the DPDK from static library mode to dynamic library mode, the normal application program will not run. During initialization, rte_eth_dev_count () always returns 0, while using dpdk_nic_bind.py-- status to see that the port is bound successfully.

DPDK is compiled into a static library by default. To change it to a dynamic library, you only need to change the CONFIG_RTE_BUILD_SHARED_LIB=n in the common_linuxapp file to CONFIG_RTE_BUILD_SHARED_LIB=y.

After DPDK is compiled into a dynamic library, each driver of PMD is compiled into .so files separately, and the .so files that need to be linked are not specified in the application, which leads to the problem that the port cannot be detected.

PMD has several drivers. For better portability, it is recommended to specify .so files in Makefile that link all drivers, LDLIBS + =-lrte_pmd_e1000-lrte_pmd_i40e-lrte_pmd_ixgbe.

If the application runs in a virtual machine environment, you also need to specify librte_pmd_virtio_uio.so and librte_pmd_vmxnet3_uio.so.

The above content is how to solve the problem that the application can not detect the port after DPDK is compiled into a dynamic library. Have you learned the knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report