Hi Jerome, > However, when I tried to perform some performance tests I was quite > disappointed by the results : the buffer allocation for each packet is not > efficient at all. My question is then : Is there any way to increase the > performances ? To allocate buffers, I use the function "vlib_buffer_alloc" > defined in "buffer_funcs.h" but is it the right function to use ?
Do you allocate buffers in batch? Let's say you want to encapsulate a batch of packets, instead of doing: while (n_left) u32 bi vlib_buffer_t *b vlib_buffer_alloc(vm, &bi, 1) b = vlib_get_buffer (vm, bi) add b to the chain ... You should do something like (allocation error checking etc. is left as an exercise): u32 bi[VLIB_FRAME_SIZE] vlib_buffer_t *bufs[VLIB_FRAME_SIZE] vlib_buffer_alloc (vm, bi, n_left) vlib_get_buffers (vm, bi, bufs, n_left) while (n_left) add bufs[i] to the chain ... > In my case, the best option would be to have more space available in the > buffer's pre-data area but VPP does not seem to be built in a way that > allows easy modifications of the "PRE_DATA_SIZE" value. Am I right or is > there any "clean" method to change this value ? It is define as a cmake variable and can be customize through eg. cmake-gui. ben
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#19791): https://lists.fd.io/g/vpp-dev/message/19791 Mute This Topic: https://lists.fd.io/mt/84230132/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-