[dpdk] service core

 

dpdk 17.11 增加了一组新的API,serivce core

如命名,就是用一组core跑service函数。

我自己的测试程序如下:

https://github.com/tony-caotong/knickknack/tree/master/test/dpdk_service_core

 

测试程序的输出:

[root@D128 service_cores]# ./build/service_cores 
EAL: Detected 4 lcore(s)
EAL: No free hugepages reported in hugepages-1048576kB
EAL: Probing VFIO support...
registe service: 0
registe service: 1
main...
test. 1 @ core 3
test. 2 @ core 2
main...
test. 1 @ core 3
test. 2 @ core 2
main...
test. 1 @ core 3

 

可以结合如下命令,查看线程信息,辅助理解处理流程。

[root@D128 dpdk-stable-17.11.1]# top -H -p `pidof service_cores`

 

更多资料:

it is possible to assign specific workloads to each service core, and map N workloads to M number of service cores.

Each service lcore loops over the services that are enabled for that core, and invokes the function to run the service.

 

https://dpdk.org/doc/guides/prog_guide/service_cores.html

https://dpdk.org/doc/api/rte__service__component_8h_source.html

https://dpdk.org/doc/api/rte__service_8h_source.html

 

转载于:https://www.cnblogs.com/hugetong/p/8963481.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值