All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Removal of RTE_MBUF_REFCNT
@ 2015-02-16 16:08 Sergio Gonzalez Monroy
       [not found] ` <1424102913-18944-1-git-send-email-sergio.gonzalez.monroy-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 23+ messages in thread
From: Sergio Gonzalez Monroy @ 2015-02-16 16:08 UTC (permalink / raw)
  To: dev-VfR2kkLFssw

This patch tries to remove the RTE_MBUF_REFCNT config options and dependencies
by introducing a new mbuf flag IND_ATTACHED_MBUF that would indicate when the mbuf
is an indirect attached mbuf, to differentiate between indirect mbufs and mbufs
with external memory buffers (ie. vhost zero copy).

Previous discussion:
http://dpdk.org/ml/archives/dev/2014-October/007127.html

Currently for mbufs with refcnt, we cannot free mbufs with external memory
buffers (ie. vhost zero copy), as they are recognized as indirect
attached mbufs and therefore we free the direct mbuf it points to,
resulting in an error in the case of external memory buffers.

We solve the issue by introducing the IND_ATTACHED_MBUF flag, which indicates
that the mbuf is an indirect attached mbuf pointing to another mbuf.
When we free an mbuf, we only free the direct mbuf if the flag is set.
Freeing an mbuf with external buffer is the same as freeing a non attached mbuf.
The flag is set during attach and clear on detach.

So in the case of vhost zero copy where we have mbufs with external
buffers, by default we just free the mbuf and it is up to the user to deal with
the external buffer.

Sergio Gonzalez Monroy (2):
  mbuf: Introduce IND_ATTACHED_MBUF flag
  Remove RTE_MBUF_REFCNT references

 app/test/test_link_bonding.c            | 15 -----------
 app/test/test_mbuf.c                    | 17 +++----------
 config/common_bsdapp                    |  1 -
 config/common_linuxapp                  |  1 -
 examples/Makefile                       |  4 +--
 examples/ip_fragmentation/Makefile      |  4 ---
 examples/ip_pipeline/Makefile           |  3 ---
 examples/ip_pipeline/main.c             |  5 ----
 examples/ipv4_multicast/Makefile        |  4 ---
 examples/vhost/main.c                   | 19 +++-----------
 lib/librte_ip_frag/Makefile             |  4 ---
 lib/librte_ip_frag/rte_ip_frag.h        |  4 ---
 lib/librte_mbuf/rte_mbuf.c              |  2 --
 lib/librte_mbuf/rte_mbuf.h              | 45 +++++++--------------------------
 lib/librte_pmd_bond/Makefile            |  4 ---
 lib/librte_pmd_bond/rte_eth_bond.h      |  2 --
 lib/librte_pmd_bond/rte_eth_bond_args.c |  2 --
 lib/librte_pmd_bond/rte_eth_bond_pmd.c  | 10 --------
 lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c   |  8 ------
 lib/librte_port/Makefile                |  4 ---
 20 files changed, 19 insertions(+), 139 deletions(-)

-- 
1.9.3

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

end of thread, other threads:[~2015-02-23 18:36 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-16 16:08 [PATCH 0/2] Removal of RTE_MBUF_REFCNT Sergio Gonzalez Monroy
     [not found] ` <1424102913-18944-1-git-send-email-sergio.gonzalez.monroy-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-02-16 16:08   ` [PATCH 1/2] mbuf: Introduce IND_ATTACHED_MBUF flag Sergio Gonzalez Monroy
2015-02-16 16:08   ` [PATCH 2/2] Remove RTE_MBUF_REFCNT references Sergio Gonzalez Monroy
     [not found]     ` <1424102913-18944-3-git-send-email-sergio.gonzalez.monroy-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-02-18  9:16       ` Olivier MATZ
     [not found]         ` <54E45888.7070603-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
2015-02-18  9:35           ` Bruce Richardson
2015-02-18  9:48             ` Ananyev, Konstantin
     [not found]               ` <2601191342CEEE43887BDE71AB977258213EF5E4-pww93C2UFcwu0RiL9chJVbfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2015-02-18 10:00                 ` Bruce Richardson
2015-02-18 10:14                   ` Olivier MATZ
     [not found]                     ` <54E46612.7050809-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
2015-02-18 10:22                       ` Ananyev, Konstantin
2015-02-18 10:22                       ` Bruce Richardson
2015-02-18 10:33                         ` Olivier MATZ
     [not found]                           ` <54E46A8C.9010105-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
2015-02-18 10:37                             ` Bruce Richardson
2015-02-18 10:47                               ` Olivier MATZ
2015-02-18 10:47                             ` Ananyev, Konstantin
     [not found]                               ` <2601191342CEEE43887BDE71AB977258213EF67E-pww93C2UFcwu0RiL9chJVbfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2015-02-18 11:01                                 ` Olivier MATZ
2015-02-18  9:52             ` Olivier MATZ
2015-02-16 20:47   ` [PATCH 0/2] Removal of RTE_MBUF_REFCNT Stephen Hemminger
     [not found]     ` <20150216154710.42bd6fe9-CA4OZQ/Yy2Lykuyl+CZolw@public.gmane.org>
2015-02-17  8:43       ` Gonzalez Monroy, Sergio
2015-02-18 11:03   ` [PATCH v2 " Sergio Gonzalez Monroy
     [not found]     ` <1424257383-4177-1-git-send-email-sergio.gonzalez.monroy-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-02-18 11:03       ` [PATCH v2 1/2] mbuf: Introduce IND_ATTACHED_MBUF flag Sergio Gonzalez Monroy
2015-02-18 11:03       ` [PATCH v2 2/2] Remove RTE_MBUF_REFCNT references Sergio Gonzalez Monroy
2015-02-18 12:05       ` [PATCH v2 0/2] Removal of RTE_MBUF_REFCNT Ananyev, Konstantin
     [not found]         ` <2601191342CEEE43887BDE71AB977258213EF713-pww93C2UFcwu0RiL9chJVbfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2015-02-23 18:36           ` Thomas Monjalon

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.