DPDK-尝试(2)-mdns收发包的问题
最近在完善mdns的时候,收发包这里碰到了一点问题。
使用rte_eal_mp_remote_launch
在其他lcore启动了dns_worker_start
这个收发包入口。原本是想在每一个lcore来处理对应的ports这样的思路,但是发现在接受的时候有问题。当PORT_PER_LCORE
为1时,希望形成一个(lcore1,port0),(lcore2,port1)…这样一种配对处理,但是在测试端发包的时候,接收不到数据。
1
2
3
4
5
6
7
rte_eal_mp_remote_launch(dns_worker_start, NULL, SKIP_MAIN);
...
for (i = 0; i < PORT_PER_LCORE; i++)
{
nb_rx = rte_eth_rx_burst(ports_matched[i], 0, pkts_burst,
MAX_PKT_BURST);
}
奇怪的是,假如我修改成了(lcore1,port0),(lcore2,port0)…这样的结构或者是直接只启用l(lcore1,port0)反而能够正常的接到数据了。这一点真的难理解,后面看看源码来能不能解决。
This post is licensed under CC BY 4.0 by the author.