Hi,

>> I have searched the mailing list and know about the DPDK take buffer from 
>> VPP,
Correct. VPP does two things to allow DPDK to use VPP buffers.


  1.  Register two mempool ops to DPDK namely “vpp” (cached/fast) and 
“vpp-no-cache” (non-cached/slow). See function dpdk_buffer_pool_create() in 
src/plugin/dpdk/buffer.c
  2.  For each VPP buffer pool (as per NUMA) create two mempools, one having 
mempool_ops set as “vpp” and other one having “vpp-no-cache”

For each outgoing packet, non-cached mempool is used whenever there is (refcnt 
>1) (See dpdk_validate_rte_mbuf() function in 
src/plugins/dpdk/device/device.c). In case where refcnt >1, DPDK will end up 
calling enqueue/dequeue function of “vpp-no-cache” mempool ops, otherwise 
function of “vpp” mempool ops are called

Bottom line, buffers will be freed to VPP pool only when mbuf.refcnt ==1.

Thanks,
Nitin
From: vpp-dev@lists.fd.io <vpp-dev@lists.fd.io> On Behalf Of guangwei
Sent: Wednesday, July 24, 2019 3:14 PM
To: vpp-dev@lists.fd.io
Subject: [EXT] [vpp-dev] VPP version 19.04 - Confusing with vlib_buffer and 
rte_mbuf (use DPDK as interface input) referent count operations #vpp

External Email
________________________________
Hi, everyone

I'am a newer with VPP architeture,  I want't to use the vlib_buffer reference 
count(such as clone) to reduce the copies,
but I'am confused with the referent count  operations between the vlib_buffer 
and rte_mbuf (use DPDK as the interface input),  I have searched the mailing 
list and know about the DPDK take buffer from VPP,  but I'am still confused 
with these memory implementations,

Is there anyone  give some key points about the relationship between the 
rte_mbuf and vlib_buffer memory implementation, such as how DPDK take buffer 
from VPP and  allocation/free between the two parts?


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#13560): https://lists.fd.io/g/vpp-dev/message/13560
Mute This Topic: https://lists.fd.io/mt/32582620/21656
Mute #vpp: https://lists.fd.io/mk?hashtag=vpp&subid=1480452
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to