pinggit / dpdk-contrail-book

contrail dpdk day one book
9 stars 3 forks source link

TX queue map between vif and tap #28

Open pinggit opened 3 years ago

pinggit commented 3 years ago

For single queue scenario, I’m confused how the returning traffic (from bond to VM) works. Say tap was allocated to lcore 10 only. When vif0 got the traffic it can be in any lcore, let's assumelcore11 got the packet and no LB happens, Will it has to know lcore10 connects to the RX VM so it fwd lcore11 -> lcore10 -> VM?

Or, the lcore allocation is only for RX direction? If that is the case, then it is worth to say it explicitly in our book.

pinggit commented 3 years ago

From: Laurent Antoine Durand ldurand@juniper.net Sent: Friday, October 23, 2020 5:13 AM To: Ping Song pings@juniper.net; Kiran KN kirankn@juniper.net; Przemyslaw Grygiel pgrygiel@juniper.net Subject: RE: vrouter/DPDK day one book: single queue

The polling core is only for vif RX side. This is what is described into dpdkinfo -c tools. The the packet is processed by a core (the same or another). Then this core has to deliver the packet on a TX queue. I have no idea how the TX queue is chosen.

Vif0 (N queues) to vif X (less than N queues): core 10 is polling on vif0 core 11 is processing the packet and is delivering the packet on of the vif X queue (I do not know the target Q is selected – probably a hash is calculated).

vif X to vif0 Core X is the polling core on vif X Core Y is the processing core and is delivering the packet on one of the vif 0 queue (here probably the TX queue attached to it has we have exactly the same number of Q on vif0 side as number of core).

Laurent