如何在基于dpdk的应用程序中启用调试模式? [英] How can I enable debug mode in a dpdk-based application?

查看:1203
本文介绍了如何在基于dpdk的应用程序中启用调试模式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

运行基于dpdk的应用程序时遇到一些错误.我发现调用dpdk库提供的rte_eth_dev_configure()函数时发生错误.错误代码为-22.但是,我希望该应用程序显示更多调试信息,以便我可以快速关注错误部分.

I encounter some errors when running a dpdk-based application. I find the error occurs when invoking rte_eth_dev_configure() function provided by dpdk library. The error code is -22. However, I want the application to show more debug information so that I can quickly focus on the error part.

我做了RTFM并修改了$RTE_SDK/build/.config.我将RTE_LIBRTE_ETHDEV_DEBUG设置为y.但这没有用. rte_vlog()函数将日志消息放在哪里?

I did RTFM and modified $RTE_SDK/build/.config. I turned RTE_LIBRTE_ETHDEV_DEBUG to be y. But It didn't work. Where does rte_vlog() function put log messages?

您想帮我吗?任何建议表示赞赏!

Would you like to help me? Any suggestion is appreciated!

推荐答案

您还应该更改默认日志级别,否则所有调试消息都会在编译过程中被编译出来,即:

You should also change the default log level, otherwise all the debug messages will be compiled out during the compilation, i.e.:

RTE_LOG_LEVEL=RTE_LOG_DEBUG
RTE_LIBRTE_ETHDEV_DEBUG=y

也请参阅EXTRA_CFLAGS.您可能还想添加调试符号并禁用优化,即:

Please also have a look at EXTRA_CFLAGS. You might also want to add the debug symbols and disable optimizations, i.e.:

make EXTRA_CFLAGS="-O0 -g" ...

这篇关于如何在基于dpdk的应用程序中启用调试模式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆