[dpdk-dev] [PATCH v6 0/2] kni: use bulk functions to allocate and free mbufs

Ferruh Yigit ferruh.yigit at intel.com
Wed Jan 25 20:04:05 CET 2017

On 1/19/2017 4:46 AM, Sergey Vyazmitinov wrote:
> Optimized kni_allocate_mbufs and kni_free_mbufs by using mbuf bulk functions

Hi Sergey,

Although I found this patch and its idea useful, performance test result
is showing a performance lose after this patch.

In my test setup [1] the performance drops from ~1.88Mpps to ~1.6Mpps.
What are your test results, are you observing a performance gain?

To analyze the test result, I split the kni patch into two, -it may be
good idea to split these in patchset too-, bulk free and bulk alloc.

It looks like bulk free does not make any difference. This may be
because bottleneck is somewhere else.

On the other hand, bulk alloc is causing the performance drop, but not
mainly because of using bulk mbuf alloc, instead because of alloc logic

It seems cost of checking free space of the fifo is more than allocating
a fix number of mbuf, fill fifo until it gets full and free remaining mbufs.
I will add more comment into patch itself, and I have another idea,
which looks like giving better result.


- lo_mode_fifo_skb
- single kthread, binded to a core
- single port, connected to traffic generator

> Sergey Vyazmitinov (2):
>   kni: add bulk function to free mbufs
>   kni: Use bulk functions to allocate and free mbufs
>  lib/librte_kni/rte_kni.c      | 47 +++++++++++++++++++----------------------
>  lib/librte_kni/rte_kni_fifo.h | 18 ++++++++++++++++
>  lib/librte_mbuf/rte_mbuf.h    | 49 +++++++++++++++++++++++++++++++++++++++++++
>  3 files changed, 89 insertions(+), 25 deletions(-)

More information about the dev mailing list