DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH v2] doc: correct description of attach to indirect mbuf
@ 2016-12-06  8:25 Baruch Siach
  2016-12-06 11:03 ` Mcnamara, John
  0 siblings, 1 reply; 5+ messages in thread
From: Baruch Siach @ 2016-12-06  8:25 UTC (permalink / raw)
  To: dev; +Cc: John McNamara, Olivier Matz, Baruch Siach

Since commit 4a96e8b652181 ("mbuf: allow to clone an indirect mbuf")
attaching to an indirect mbuf creates a clone of that mbuf. Update the mbuf
documentation to match.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
v2: fix checkpatch issues: long commit log lines, short commit id
---
 doc/guides/prog_guide/mbuf_lib.rst | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/doc/guides/prog_guide/mbuf_lib.rst b/doc/guides/prog_guide/mbuf_lib.rst
index f0aa21a6d4aa..6e73fc5a834b 100644
--- a/doc/guides/prog_guide/mbuf_lib.rst
+++ b/doc/guides/prog_guide/mbuf_lib.rst
@@ -253,7 +253,8 @@ Similarly, whenever the indirect buffer is detached, the reference counter on th
 If the resulting reference counter is equal to 0, the direct buffer is freed since it is no longer in use.
 
 There are a few things to remember when dealing with indirect buffers.
-First of all, it is not possible to attach an indirect buffer to another indirect buffer.
+First of all, an indirect buffer is never attached to another indirect buffer.
+Attempting to attach buffer A to indirect buffer B that is attached to C, makes rte_pktmbuf_attach() automatically attach A to C, effectively cloning B.
 Secondly, for a buffer to become indirect, its reference counter must be equal to 1,
 that is, it must not be already referenced by another indirect buffer.
 Finally, it is not possible to reattach an indirect buffer to the direct buffer (unless it is detached first).
-- 
2.10.2

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

* Re: [dpdk-dev] [PATCH v2] doc: correct description of attach to indirect mbuf
  2016-12-06  8:25 [dpdk-dev] [PATCH v2] doc: correct description of attach to indirect mbuf Baruch Siach
@ 2016-12-06 11:03 ` Mcnamara, John
  2016-12-06 11:11   ` Baruch Siach
  0 siblings, 1 reply; 5+ messages in thread
From: Mcnamara, John @ 2016-12-06 11:03 UTC (permalink / raw)
  To: Baruch Siach, dev; +Cc: Olivier Matz



> -----Original Message-----
> From: Baruch Siach [mailto:baruch@tkos.co.il]
> Sent: Tuesday, December 6, 2016 8:25 AM
> To: dev@dpdk.org
> Cc: Mcnamara, John <john.mcnamara@intel.com>; Olivier Matz
> <olivier.matz@6wind.com>; Baruch Siach <baruch@tkos.co.il>
> Subject: [PATCH v2] doc: correct description of attach to indirect mbuf
> 
> Since commit 4a96e8b652181 ("mbuf: allow to clone an indirect mbuf")
> attaching to an indirect mbuf creates a clone of that mbuf. Update the
> mbuf documentation to match.
> 
> Signed-off-by: Baruch Siach <baruch@tkos.co.il>
> ---
> v2: fix checkpatch issues: long commit log lines, short commit id
> ---
>  doc/guides/prog_guide/mbuf_lib.rst | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/doc/guides/prog_guide/mbuf_lib.rst
> b/doc/guides/prog_guide/mbuf_lib.rst
> index f0aa21a6d4aa..6e73fc5a834b 100644
> --- a/doc/guides/prog_guide/mbuf_lib.rst
> +++ b/doc/guides/prog_guide/mbuf_lib.rst
> @@ -253,7 +253,8 @@ Similarly, whenever the indirect buffer is detached,
> the reference counter on th  If the resulting reference counter is equal
> to 0, the direct buffer is freed since it is no longer in use.
> 
>  There are a few things to remember when dealing with indirect buffers.
> -First of all, it is not possible to attach an indirect buffer to another
> indirect buffer.
> +First of all, an indirect buffer is never attached to another indirect
> buffer.
> +Attempting to attach buffer A to indirect buffer B that is attached to C,
> makes rte_pktmbuf_attach() automatically attach A to C, effectively
> cloning B.

Thanks, please keep the doc fixes coming.

It would be better to quote the function in fixed width text like: ``rte_pktmbuf_attach()``.

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

* Re: [dpdk-dev] [PATCH v2] doc: correct description of attach to indirect mbuf
  2016-12-06 11:03 ` Mcnamara, John
@ 2016-12-06 11:11   ` Baruch Siach
  2016-12-06 11:35     ` Mcnamara, John
  0 siblings, 1 reply; 5+ messages in thread
From: Baruch Siach @ 2016-12-06 11:11 UTC (permalink / raw)
  To: Mcnamara, John; +Cc: dev, Olivier Matz

Hi John,

On Tue, Dec 06, 2016 at 11:03:18AM +0000, Mcnamara, John wrote:
> > -----Original Message-----
> > From: Baruch Siach [mailto:baruch@tkos.co.il]
> > Sent: Tuesday, December 6, 2016 8:25 AM
> > To: dev@dpdk.org
> > Cc: Mcnamara, John <john.mcnamara@intel.com>; Olivier Matz
> > <olivier.matz@6wind.com>; Baruch Siach <baruch@tkos.co.il>
> > Subject: [PATCH v2] doc: correct description of attach to indirect mbuf
> > 
> > Since commit 4a96e8b652181 ("mbuf: allow to clone an indirect mbuf")
> > attaching to an indirect mbuf creates a clone of that mbuf. Update the
> > mbuf documentation to match.
> > 
> > Signed-off-by: Baruch Siach <baruch@tkos.co.il>
> > ---
> > v2: fix checkpatch issues: long commit log lines, short commit id
> > ---
> >  doc/guides/prog_guide/mbuf_lib.rst | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> > 
> > diff --git a/doc/guides/prog_guide/mbuf_lib.rst
> > b/doc/guides/prog_guide/mbuf_lib.rst
> > index f0aa21a6d4aa..6e73fc5a834b 100644
> > --- a/doc/guides/prog_guide/mbuf_lib.rst
> > +++ b/doc/guides/prog_guide/mbuf_lib.rst
> > @@ -253,7 +253,8 @@ Similarly, whenever the indirect buffer is detached,
> > the reference counter on th  If the resulting reference counter is equal
> > to 0, the direct buffer is freed since it is no longer in use.
> > 
> >  There are a few things to remember when dealing with indirect buffers.
> > -First of all, it is not possible to attach an indirect buffer to another
> > indirect buffer.
> > +First of all, an indirect buffer is never attached to another indirect
> > buffer.
> > +Attempting to attach buffer A to indirect buffer B that is attached to C,
> > makes rte_pktmbuf_attach() automatically attach A to C, effectively
> > cloning B.
> 
> Thanks, please keep the doc fixes coming.
> 
> It would be better to quote the function in fixed width text like: 
> ``rte_pktmbuf_attach()``.

None of the function names mentioned in this chapter are quoted. I can post a 
fix for that, but I think it should be a separate patch.

baruch

-- 
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch@tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -

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

* Re: [dpdk-dev] [PATCH v2] doc: correct description of attach to indirect mbuf
  2016-12-06 11:11   ` Baruch Siach
@ 2016-12-06 11:35     ` Mcnamara, John
  2016-12-06 17:08       ` Thomas Monjalon
  0 siblings, 1 reply; 5+ messages in thread
From: Mcnamara, John @ 2016-12-06 11:35 UTC (permalink / raw)
  To: Baruch Siach; +Cc: dev, Olivier Matz

> -----Original Message-----
> From: Baruch Siach [mailto:baruch@tkos.co.il]
> Sent: Tuesday, December 6, 2016 11:11 AM
> To: Mcnamara, John <john.mcnamara@intel.com>
> Cc: dev@dpdk.org; Olivier Matz <olivier.matz@6wind.com>
> Subject: Re: [PATCH v2] doc: correct description of attach to indirect
> mbuf
> 
> ...
> > Thanks, please keep the doc fixes coming.
> >
> > It would be better to quote the function in fixed width text like:
> > ``rte_pktmbuf_attach()``.
> 
> None of the function names mentioned in this chapter are quoted. I can
> post a fix for that, but I think it should be a separate patch.
> 

Unfortunately, the documentation isn't very consistent in this. You can
ignore it for this patch.

Acked-by: John McNamara <john.mcnamara@intel.com>

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

* Re: [dpdk-dev] [PATCH v2] doc: correct description of attach to indirect mbuf
  2016-12-06 11:35     ` Mcnamara, John
@ 2016-12-06 17:08       ` Thomas Monjalon
  0 siblings, 0 replies; 5+ messages in thread
From: Thomas Monjalon @ 2016-12-06 17:08 UTC (permalink / raw)
  To: Baruch Siach; +Cc: dev, Mcnamara, John, Olivier Matz

> > > Thanks, please keep the doc fixes coming.
> > >
> > > It would be better to quote the function in fixed width text like:
> > > ``rte_pktmbuf_attach()``.
> > 
> > None of the function names mentioned in this chapter are quoted. I can
> > post a fix for that, but I think it should be a separate patch.
> > 
> 
> Unfortunately, the documentation isn't very consistent in this. You can
> ignore it for this patch.
> 
> Acked-by: John McNamara <john.mcnamara@intel.com>

Applied, thanks

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

end of thread, other threads:[~2016-12-06 17:08 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-06  8:25 [dpdk-dev] [PATCH v2] doc: correct description of attach to indirect mbuf Baruch Siach
2016-12-06 11:03 ` Mcnamara, John
2016-12-06 11:11   ` Baruch Siach
2016-12-06 11:35     ` Mcnamara, John
2016-12-06 17:08       ` Thomas Monjalon

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).