美文网首页程序员
OpenFastPath 学习3(udpecho 线程组成)

OpenFastPath 学习3(udpecho 线程组成)

作者: forxyz | 来源:发表于2018-11-30 21:25 被阅读1次

udpecho运行起来之后,分析一下,它由那些线程组成,如下:

(gdb) i thread

发现有11个线程,每个线程探查一下。

(gdb) thread 1

可见该线程为主线程,其main函数所在。

(gdb) thread 2

main--->odp_init_global---->odp_init_dpdk--->rte_eal_init--->rte_eal_intr_init---->eal_intr_thread_main,

该线程是一个中断处理线程,由DPDK启动。

(gdb) thread 3/4

main-->ofp_init_global--->ofp_ifnet_create--->odph_odpthreads_create--->_odph_thread_run_start_routine--->sp_rx_thread + sp_tx_thread

SP=SLOW PATH 线程3和线程4与虚拟网卡进行通信。rx和tx各一个线程。

(gdb) thread 5

netlink线程,与内核协议栈进行通信。

thread 6/7/8/9/10/11/

schedule_loop线程,收发包线程。

thread 12

cli_server 命令服务的线程。

thread 13

用户自己的线程 udp_server.c中的线程

相关文章

网友评论

    本文标题:OpenFastPath 学习3(udpecho 线程组成)

    本文链接:https://www.haomeiwen.com/subject/bpekcqtx.html