Hello all, While going through the VPP code, I have not fully understood what the following functions mean and when should they be used?
1. static_always_inline void vlib_buffer_enqueue_to_next (vlib_main_t * vm, vlib_node_runtime_t * node, u32 * buffers, u16 * nexts, uword count) I could see following comments about this function /* * Send the packets along their respective next-node graph arcs * Considerable locality of reference is expected, most if not all * packets in the inbound vector will traverse the same next-node * arc */ I tried reading through the code but could not figure out what this function does, and how this is implemented. I see that the code has optimizations for various CPU, but not could not figure out what those optimizations are. 2. #define vlib_prefetch_buffer_header (b, type ) CLIB_PREFETCH (b, 64, type) This gets expanded to: #define _CLIB_PREFETCH(n,size,type) \ if ((size) > (n)*CLIB_CACHE_LINE_BYTES) \ __builtin_prefetch (_addr + (n)*CLIB_CACHE_LINE_BYTES, \ CLIB_PREFETCH_##type, \ /* locality */ 3); type can be either LOAD or STORE. What is the purpose of these two operations? I am sure I am missing some thing with respect to understanding prefetch. I assume LOAD will prefetch data from memory, and STORE performs its inverse operation? Thanks and Regards, Raj
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#11878): https://lists.fd.io/g/vpp-dev/message/11878 Mute This Topic: https://lists.fd.io/mt/28982509/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-