2016-05-17 01:53, Hiroyuki Mikita: > The rte_pktmbuf_detach() function should decrease refcnt on a direct > buffer. > > Signed-off-by: Hiroyuki Mikita <h.mikita89 at gmail.com> > --- > v2: > * introduced a new function rte_pktmbuf_detach2() which decrease refcnt.
As you have noticed, "whenever the indirect buffer is detached, the reference counter on the direct buffer is decremented." So the current behaviour of rte_pktmbuf_detach() is buggy. Why not fix it without renaming? If you consider this behavioral bug is part of the API, we can fix it in a new function unattach and deprecate detach. But Konstantin, why do you want to keep a restore function? What is the need? Please explicit the function name for the detach operation in doc/guides/prog_guide/mbuf_lib.rst (whatever detach2 or unattach). > * marked rte_pktmbuf_detach() as deprecated. > * added comments about refcnt to rte_pktmbuf_attach() and > rte_pktmbuf_detach(). > * checked refcnt when detaching in unit tests. > * added this issue to release notes.