pktb_usebuf() is a copy of pktb_alloc() with the first part modified to use a supplied buffer rather than calloc() one. I thought this would give a measurable performance boost and it does. All the code after the memset() call is common to pktb_alloc(). If you like, I can submit a v2 with this code in a static function called by both. Duncan Roe (1): src: Add alternative function to pktb_alloc to avoid malloc / free overhead include/libnetfilter_queue/pktbuff.h | 2 + src/extra/pktbuff.c | 82 ++++++++++++++++++++++++++++++++++++ 2 files changed, 84 insertions(+) -- 2.14.5