DPDK flow_classify.c的一段代码:

size = RTE_CACHE_LINE_ROUNDUP(sizeof(struct flow_classifier_acl));

这个宏定义RTE_CACHE_LINE_ROUNDUP不清楚是什么意思,也不知道在哪个文件中。得知一个宏定义的方法(DPDK的代码在 lib 文件夹内):

cd /home/chang/dpdk
find lib/ -name *.h | xargs grep 'RTE_CACHE_LINE_ROUNDUP'
lib/librte_eal/common/include/rte_memory.h:#define RTE_CACHE_LINE_ROUNDUP(size) \

得知头文件的名称后rte_memory.h,到官方API手册上找到这个头文件:http://doc.dpdk.org/api/rte__memory_8h.html

阅读源代码,查出某个宏定义在哪个头文件内的方法

阅读源代码,查出某个宏定义在哪个头文件内的方法

……感觉是很弱智的方法

参考:https://blog.csdn.net/whoamiyang/article/details/52638558

相关文章:

  • 2022-12-23
  • 2021-08-30
  • 2022-12-23
  • 2022-12-23
  • 2021-08-20
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-10-30
  • 2022-12-23
  • 2022-01-02
  • 2022-12-23
  • 2022-02-03
  • 2021-11-30
  • 2021-12-27
相关资源
相似解决方案