mtcp-stack / mtcp

mTCP: A Highly Scalable User-level TCP Stack for Multicore Systems
Other
1.98k stars 435 forks source link

Can I have a non-mtcp thread running in the system? #269

Open azamikram opened 4 years ago

azamikram commented 4 years ago

Hello,

Let say I have two mtcp threads, running on two different cores, which are reading packets from the NIC. After receiving a packet, the mtcp thread puts it in a ring buffer. Another thread (non-mtcp thread, running on a third core using rte_eal_remote_launch) reads the packet from that ring buffer, does some processing, and generates a response. That response is then send to the mtcp thread, which received the packet initially from NIC, using a different ring buffer. Finally, mtcp sends the response to the NIC using its own TX queue.

My question is this can I have a thread in my program which doesn't directly communicate with NIC (non-mtcp thread)?

Thanks,

ajamshed commented 4 years ago

Short answer: yes.

You are trying to follow a model that is somewhat different with how mTCP should be used. Also, you can have a look at eventdev.

I have a LOT of questions regarding what you are trying to achieve with your program. Please send me an email. I will like to talk about this in detail.