Open FLY199806 opened 5 years ago
Hi, I have not read your code thoroughly but if you have used the symmetric.mp as an example then each process run on its own queue, hence they do not see the same packets.
You need quite a rewrite to make sharing work the way you expect. Each queue is emptied by the PMD and this cannot be done twice, so you need to have a master that will empty the NIC queue and then forward to a number of slave processes. You can make a refcount=num_slaves and then distribute the mbuf to a queue per slave that they will consume from and release the mbuf once they are done. When refcount hits 0 the mbuf is released for real.
That is to my knowledge the only way in DPDK
Thanks, Michael
I had some new questions.How can I send the packets from primary procsee to secondary process in 64-bit address space,and what should I send. Thanks. Chen
Hi,
look at the way the pdump work and combine it with the way simple_mp works would be my suggestion. Instead of doing a pktcopy you can just place the packet onto the receive queue of the secondary process and once it is done it will release it. If you need to send it to multiple receivers you need to set the ref_cnt to the correct number, this is also needed if both the main and secondary process need to call rte_pktmbuf_free()
I don't know if there are other/better examples. Thanks, Michael
I need to run multiple process by dpdk,and I want to run multiple snort at first.But when I decided to change it as one of the dpdk examples——symmetric_mp .I found that the packets couldn't be shared with all process. If one get the the packet,others couldn't get it. do you konw what's the trouble?
daq_dpdk.txt The file is what I changed.And I used this edition—— daq_dpdk_multiqueue-0a6b5cbcdb66dc801d12e31c9c971f2318026610