DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 0/3] Vhost app removes dependency of REFCNT
@ 2014-10-24  8:10 Ouyang Changchun
  2014-10-24  8:10 ` [dpdk-dev] [PATCH 1/3] mbuf: Use EXTERNAL_MBUF to indicate external buffer Ouyang Changchun
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Ouyang Changchun @ 2014-10-24  8:10 UTC (permalink / raw)
  To: dev

To remove the dependency of RTE_MBUF_REFCNT for vhost zero copy,
the mbuf need introduce EXTERNAL_MBUF(in ol_flags) to indicate it
attaches to an external buffer, say, from guest space. And don't
free the external buffer when freeing the mbuf itself in host, in
addition, RX function in PMD need make sure not overwrite this flag
when filling ol_flags from descriptors to mbuf.

Changchun Ouyang (3):
  mbuf use EXTERNAL_MBUF in ol_flags to indicate it is an external
    buffer,     when freeing such kind of mbuf, just need put mbuf
    itself back into mempool,     doesn't free the attached external
    buffer, user/caller need take care of     detaching and freeing the
    external buffer.
  Every pmd RX function need keep the EXTERNAL_MBUF flag in
    mbuf.ol_flags,     and can't overwrite it when filling ol_flags from
    descriptor to mbuf,     otherwise, it probably cause to crash when
    freeing a mbuf and trying     to freeing its attached external
    buffer, say, from guest space.
  vhost zero copy removes the dependency on macro REFCNT by using
    EXTERNAL_MBUF     flag in mbuf.ol_flags to indicate it is an
    external buffer from guest.

 examples/vhost/main.c                 | 19 +++++--------------
 lib/librte_mbuf/rte_mbuf.h            |  5 ++++-
 lib/librte_pmd_e1000/igb_rxtx.c       |  5 +++--
 lib/librte_pmd_i40e/i40e_rxtx.c       |  8 +++++---
 lib/librte_pmd_ixgbe/ixgbe_rxtx.c     |  8 +++++---
 lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c | 12 ++++++++----
 6 files changed, 30 insertions(+), 27 deletions(-)

-- 
1.8.4.2

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2014-10-25  2:00 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-24  8:10 [dpdk-dev] [PATCH 0/3] Vhost app removes dependency of REFCNT Ouyang Changchun
2014-10-24  8:10 ` [dpdk-dev] [PATCH 1/3] mbuf: Use EXTERNAL_MBUF to indicate external buffer Ouyang Changchun
2014-10-24  8:10 ` [dpdk-dev] [PATCH 2/3] pmd: RX function need keep EXTERNAL_MBUF flag Ouyang Changchun
2014-10-24 10:46   ` Ananyev, Konstantin
2014-10-24 12:34     ` Bruce Richardson
2014-10-24 15:43       ` Bruce Richardson
2014-10-24 15:58         ` Ananyev, Konstantin
2014-10-25  2:08           ` Ouyang, Changchun
2014-10-24  8:10 ` [dpdk-dev] [PATCH 3/3] vhost: Removes dependency on REFCNT for zero copy Ouyang Changchun
2014-10-24  9:47 ` [dpdk-dev] [PATCH 0/3] Vhost app removes dependency of REFCNT Thomas Monjalon
2014-10-24 10:47   ` Bruce Richardson
2014-10-25  1:01   ` Ouyang, Changchun

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).