diff mbox series

doc: add known issue with mbuf segment

Message ID 20210804132952.2674942-1-thomas@monjalon.net (mailing list archive)
State Accepted, archived
Headers show
Series doc: add known issue with mbuf segment | expand

Checks

Context Check Description
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/iol-abi-testing success Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-spell-check-testing warning Testing issues
ci/intel-Testing success Testing PASS
ci/Intel-compilation success Compilation OK
ci/github-robot success github build: passed
ci/checkpatch warning coding style issues

Commit Message

Thomas Monjalon Aug. 4, 2021, 1:29 p.m. UTC
A bug with segmented packets has been discovered but the agreement
to apply the fix is not concluded at the time of DPDK 21.08 release.
This bug seems to be in DPDK for many years and should be fixed in 21.11.

Suggested-by: Olivier Matz <olivier.matz@6wind.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 doc/guides/rel_notes/release_21_08.rst | 12 ++++++++++++
 1 file changed, 12 insertions(+)

Comments

Ajit Khaparde Aug. 4, 2021, 2:25 p.m. UTC | #1
On Wed, Aug 4, 2021 at 6:30 AM Thomas Monjalon <thomas@monjalon.net> wrote:
>
> A bug with segmented packets has been discovered but the agreement
> to apply the fix is not concluded at the time of DPDK 21.08 release.
> This bug seems to be in DPDK for many years and should be fixed in 21.11.
>
> Suggested-by: Olivier Matz <olivier.matz@6wind.com>
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>

> ---
>  doc/guides/rel_notes/release_21_08.rst | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
>
> diff --git a/doc/guides/rel_notes/release_21_08.rst b/doc/guides/rel_notes/release_21_08.rst
> index d7559ec6bf..14e32585b8 100644
> --- a/doc/guides/rel_notes/release_21_08.rst
> +++ b/doc/guides/rel_notes/release_21_08.rst
> @@ -251,6 +251,18 @@ Known Issues
>     Also, make sure to start the actual text at the margin.
>     =======================================================
>
> +* **Last mbuf segment not implicitly reset.**
> +
> +  It is expected that free mbufs have their field ``nb_seg`` set to 1,
> +  so that when it is allocated, the user does not need to set its value.
> +  The mbuf free functions are responsible of resetting this field to 1
> +  before returning the mbuf to the pool.
> +
> +  When a multi-segment mbuf is freed, the field ``nb_seg`` is not reset
> +  to 1 for the last segment of the chain. On next allocation of this segment,
> +  if the field is not explicitly reset by the user,
> +  an invalid mbuf can be created, and can cause an undefined behavior.
> +
>
>  Tested Platforms
>  ----------------
> --
> 2.31.1
>
Morten Brørup Aug. 5, 2021, 6:08 a.m. UTC | #2
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Thomas Monjalon
> Sent: Wednesday, 4 August 2021 15.30
> 
> A bug with segmented packets has been discovered but the agreement
> to apply the fix is not concluded at the time of DPDK 21.08 release.
> This bug seems to be in DPDK for many years and should be fixed in
> 21.11.
> 
> Suggested-by: Olivier Matz <olivier.matz@6wind.com>
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> ---
>  doc/guides/rel_notes/release_21_08.rst | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/doc/guides/rel_notes/release_21_08.rst
> b/doc/guides/rel_notes/release_21_08.rst
> index d7559ec6bf..14e32585b8 100644
> --- a/doc/guides/rel_notes/release_21_08.rst
> +++ b/doc/guides/rel_notes/release_21_08.rst
> @@ -251,6 +251,18 @@ Known Issues
>     Also, make sure to start the actual text at the margin.
>     =======================================================
> 
> +* **Last mbuf segment not implicitly reset.**
> +
> +  It is expected that free mbufs have their field ``nb_seg`` set to 1,
> +  so that when it is allocated, the user does not need to set its
> value.
> +  The mbuf free functions are responsible of resetting this field to 1
> +  before returning the mbuf to the pool.
> +
> +  When a multi-segment mbuf is freed, the field ``nb_seg`` is not
> reset
> +  to 1 for the last segment of the chain. On next allocation of this
> segment,
> +  if the field is not explicitly reset by the user,
> +  an invalid mbuf can be created, and can cause an undefined behavior.
> +
> 

I have a couple of suggestions:

1. Add that this bug was present in previous DPDK releases for many years. If possible, mention which release introduced the bug.

We don't want users to choose to stay on older release, thinking that it does not have this bug.

Also, if a user experiences unexplainable problems with segmented packets an older DPDK release, he might get lucky and find these release notes, which could reveal the root cause of the problems he is experiencing.

2. Add a link to the patch that fixes the bug. It will let users affected by the bug easily fix it (possibly at the expense of degraded performance).

With those two additions,
Acked-by: Morten Brørup <mb@smartsharesystems.com>

-Morten
Thomas Monjalon Aug. 6, 2021, 2:21 p.m. UTC | #3
05/08/2021 08:08, Morten Brørup:
> > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Thomas Monjalon
> > Sent: Wednesday, 4 August 2021 15.30
> > 
> > A bug with segmented packets has been discovered but the agreement
> > to apply the fix is not concluded at the time of DPDK 21.08 release.
> > This bug seems to be in DPDK for many years and should be fixed in
> > 21.11.
> > 
> > Suggested-by: Olivier Matz <olivier.matz@6wind.com>
> > Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> > ---
> >  doc/guides/rel_notes/release_21_08.rst | 12 ++++++++++++
> >  1 file changed, 12 insertions(+)
> > 
> > diff --git a/doc/guides/rel_notes/release_21_08.rst
> > b/doc/guides/rel_notes/release_21_08.rst
> > index d7559ec6bf..14e32585b8 100644
> > --- a/doc/guides/rel_notes/release_21_08.rst
> > +++ b/doc/guides/rel_notes/release_21_08.rst
> > @@ -251,6 +251,18 @@ Known Issues
> >     Also, make sure to start the actual text at the margin.
> >     =======================================================
> > 
> > +* **Last mbuf segment not implicitly reset.**
> > +
> > +  It is expected that free mbufs have their field ``nb_seg`` set to 1,
> > +  so that when it is allocated, the user does not need to set its
> > value.
> > +  The mbuf free functions are responsible of resetting this field to 1
> > +  before returning the mbuf to the pool.
> > +
> > +  When a multi-segment mbuf is freed, the field ``nb_seg`` is not
> > reset
> > +  to 1 for the last segment of the chain. On next allocation of this
> > segment,
> > +  if the field is not explicitly reset by the user,
> > +  an invalid mbuf can be created, and can cause an undefined behavior.
> > +
> > 
> 
> I have a couple of suggestions:
> 
> 1. Add that this bug was present in previous DPDK releases for many years. If possible, mention which release introduced the bug.
> 
> We don't want users to choose to stay on older release, thinking that it does not have this bug.
> 
> Also, if a user experiences unexplainable problems with segmented packets an older DPDK release, he might get lucky and find these release notes, which could reveal the root cause of the problems he is experiencing.
> 
> 2. Add a link to the patch that fixes the bug. It will let users affected by the bug easily fix it (possibly at the expense of degraded performance).
> 
> With those two additions,
> Acked-by: Morten Brørup <mb@smartsharesystems.com>

Applied with the suggested additions:

+  This issue has a root cause in DPDK 17.05, meaning it is 4 years old.
+  A fix is available and discussed but not merged in DPDK 21.08:
+  https://patches.dpdk.org/patch/86458/
Morten Brørup Aug. 6, 2021, 2:24 p.m. UTC | #4
> From: Thomas Monjalon [mailto:thomas@monjalon.net]
> Sent: Friday, 6 August 2021 16.21
> 
> 05/08/2021 08:08, Morten Brørup:
> > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Thomas
> Monjalon
> > > Sent: Wednesday, 4 August 2021 15.30
> > >
> > > A bug with segmented packets has been discovered but the agreement
> > > to apply the fix is not concluded at the time of DPDK 21.08
> release.
> > > This bug seems to be in DPDK for many years and should be fixed in
> > > 21.11.
> > >
> > > Suggested-by: Olivier Matz <olivier.matz@6wind.com>
> > > Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> > > ---
> > >  doc/guides/rel_notes/release_21_08.rst | 12 ++++++++++++
> > >  1 file changed, 12 insertions(+)
> > >
> > > diff --git a/doc/guides/rel_notes/release_21_08.rst
> > > b/doc/guides/rel_notes/release_21_08.rst
> > > index d7559ec6bf..14e32585b8 100644
> > > --- a/doc/guides/rel_notes/release_21_08.rst
> > > +++ b/doc/guides/rel_notes/release_21_08.rst
> > > @@ -251,6 +251,18 @@ Known Issues
> > >     Also, make sure to start the actual text at the margin.
> > >     =======================================================
> > >
> > > +* **Last mbuf segment not implicitly reset.**
> > > +
> > > +  It is expected that free mbufs have their field ``nb_seg`` set
> to 1,
> > > +  so that when it is allocated, the user does not need to set its
> > > value.
> > > +  The mbuf free functions are responsible of resetting this field
> to 1
> > > +  before returning the mbuf to the pool.
> > > +
> > > +  When a multi-segment mbuf is freed, the field ``nb_seg`` is not
> > > reset
> > > +  to 1 for the last segment of the chain. On next allocation of
> this
> > > segment,
> > > +  if the field is not explicitly reset by the user,
> > > +  an invalid mbuf can be created, and can cause an undefined
> behavior.
> > > +
> > >
> >
> > I have a couple of suggestions:
> >
> > 1. Add that this bug was present in previous DPDK releases for many
> years. If possible, mention which release introduced the bug.
> >
> > We don't want users to choose to stay on older release, thinking that
> it does not have this bug.
> >
> > Also, if a user experiences unexplainable problems with segmented
> packets an older DPDK release, he might get lucky and find these
> release notes, which could reveal the root cause of the problems he is
> experiencing.
> >
> > 2. Add a link to the patch that fixes the bug. It will let users
> affected by the bug easily fix it (possibly at the expense of degraded
> performance).
> >
> > With those two additions,
> > Acked-by: Morten Brørup <mb@smartsharesystems.com>
> 
> Applied with the suggested additions:
> 
> +  This issue has a root cause in DPDK 17.05, meaning it is 4 years
> old.
> +  A fix is available and discussed but not merged in DPDK 21.08:
> +  https://patches.dpdk.org/patch/86458/
> 

Perfect! Thanks.

-Morten
diff mbox series

Patch

diff --git a/doc/guides/rel_notes/release_21_08.rst b/doc/guides/rel_notes/release_21_08.rst
index d7559ec6bf..14e32585b8 100644
--- a/doc/guides/rel_notes/release_21_08.rst
+++ b/doc/guides/rel_notes/release_21_08.rst
@@ -251,6 +251,18 @@  Known Issues
    Also, make sure to start the actual text at the margin.
    =======================================================
 
+* **Last mbuf segment not implicitly reset.**
+
+  It is expected that free mbufs have their field ``nb_seg`` set to 1,
+  so that when it is allocated, the user does not need to set its value.
+  The mbuf free functions are responsible of resetting this field to 1
+  before returning the mbuf to the pool.
+
+  When a multi-segment mbuf is freed, the field ``nb_seg`` is not reset
+  to 1 for the last segment of the chain. On next allocation of this segment,
+  if the field is not explicitly reset by the user,
+  an invalid mbuf can be created, and can cause an undefined behavior.
+
 
 Tested Platforms
 ----------------