Yes, agree with you. Here I got a thought about handoff mechanism in vPP. If looking into the DPDK crypto scheduler, you will find out that it heavily depends on DPDK rings, for buffer delivery among CPU cores and even for the packet reordering. Therefore, something comes to my mind, why can’t we use a ring for handoff?
First, as you know, the existing handoff is somewhat limited – the queue size is 32 by default, very little, and each queue item is a vector with up to 256 buffer indices, but each vector might only have very few buffers when system is not so high. It is not efficient as I can see, and system might drop packets due to queue full. Second, I think the technique used in vlib_get_frame_queue_elt might be slower or less efficient than compare-swap in dpdk ring. Even more, this 2-dimension data structure also brings up complexity when it comes to coding. F.g., handoff-dispatch needs to consolidate buffers into a size 128 vector. In general, I’d believe a ring-like mechanism probably makes handoff easier. I understand the ring requires compare-swap instruction which definitely introduces performance penalty, but on the other hand, handoff itself always introduces massive data cache misses, even worse than compare-swap. However, handoff is always worthwhile in some case even there is penalty. Appreciate you can share your opinion. Regards, Kingwel ------------------------------- Hi vpp-dev, Does there have plan to impove performance off vpp's handoff ? It's very usefull to handoff the same session's packets to same thread as lock-free. Regards chew
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#15217): https://lists.fd.io/g/vpp-dev/message/15217 Mute This Topic: https://lists.fd.io/mt/69974860/21656 Mute #vpp: https://lists.fd.io/mk?hashtag=vpp&subid=1480452 Mute #handoff: https://lists.fd.io/mk?hashtag=handoff&subid=1480452 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-