DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] test/mbuf: skip field registration at busy offset
@ 2020-10-31 14:36 Thomas Monjalon
  2020-10-31 14:57 ` David Marchand
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Monjalon @ 2020-10-31 14:36 UTC (permalink / raw)
  To: dev
  Cc: david.marchand, olivier.matz, andrew.rybchenko, stable,
	Konstantin Ananyev

There is a test for dynamic field registration at a specific offset.
Depending on which driver is probed, some dynamic fields may be
already registered at this offset.
This failure is skipped with a warning.

Fixes: 4958ca3a443a ("mbuf: support dynamic fields and flags")
Cc: stable@dpdk.org

Reported-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 app/test/test_mbuf.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/app/test/test_mbuf.c b/app/test/test_mbuf.c
index 80d1850da9..3a13cf4e1f 100644
--- a/app/test/test_mbuf.c
+++ b/app/test/test_mbuf.c
@@ -2608,9 +2608,13 @@ test_mbuf_dyn(struct rte_mempool *pktmbuf_pool)
 
 	offset3 = rte_mbuf_dynfield_register_offset(&dynfield3,
 				offsetof(struct rte_mbuf, dynfield1[1]));
-	if (offset3 != offsetof(struct rte_mbuf, dynfield1[1]))
-		GOTO_FAIL("failed to register dynamic field 3, offset=%d: %s",
-			offset3, strerror(errno));
+	if (offset3 != offsetof(struct rte_mbuf, dynfield1[1])) {
+		if (rte_errno == EBUSY)
+			printf("mbuf test error skipped: dynfield is busy\n");
+		else
+			GOTO_FAIL("failed to register dynamic field 3, offset="
+				"%d: %s", offset3, strerror(errno));
+	}
 
 	printf("dynfield: offset=%d, offset2=%d, offset3=%d\n",
 		offset, offset2, offset3);
-- 
2.28.0


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

* Re: [dpdk-dev] [PATCH] test/mbuf: skip field registration at busy offset
  2020-10-31 14:36 [dpdk-dev] [PATCH] test/mbuf: skip field registration at busy offset Thomas Monjalon
@ 2020-10-31 14:57 ` David Marchand
  2020-10-31 15:04   ` Thomas Monjalon
  0 siblings, 1 reply; 3+ messages in thread
From: David Marchand @ 2020-10-31 14:57 UTC (permalink / raw)
  To: Thomas Monjalon
  Cc: dev, Olivier Matz, Andrew Rybchenko, dpdk stable, Konstantin Ananyev

On Sat, Oct 31, 2020 at 3:37 PM Thomas Monjalon <thomas@monjalon.net> wrote:
>
> There is a test for dynamic field registration at a specific offset.
> Depending on which driver is probed, some dynamic fields may be
> already registered at this offset.
> This failure is skipped with a warning.
>
> Fixes: 4958ca3a443a ("mbuf: support dynamic fields and flags")
> Cc: stable@dpdk.org
>
> Reported-by: David Marchand <david.marchand@redhat.com>
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> ---
>  app/test/test_mbuf.c | 10 +++++++---
>  1 file changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/app/test/test_mbuf.c b/app/test/test_mbuf.c
> index 80d1850da9..3a13cf4e1f 100644
> --- a/app/test/test_mbuf.c
> +++ b/app/test/test_mbuf.c
> @@ -2608,9 +2608,13 @@ test_mbuf_dyn(struct rte_mempool *pktmbuf_pool)
>
>         offset3 = rte_mbuf_dynfield_register_offset(&dynfield3,
>                                 offsetof(struct rte_mbuf, dynfield1[1]));
> -       if (offset3 != offsetof(struct rte_mbuf, dynfield1[1]))
> -               GOTO_FAIL("failed to register dynamic field 3, offset=%d: %s",
> -                       offset3, strerror(errno));
> +       if (offset3 != offsetof(struct rte_mbuf, dynfield1[1])) {
> +               if (rte_errno == EBUSY)
> +                       printf("mbuf test error skipped: dynfield is busy\n");
> +               else
> +                       GOTO_FAIL("failed to register dynamic field 3, offset="
> +                               "%d: %s", offset3, strerror(errno));
> +       }
>
>         printf("dynfield: offset=%d, offset2=%d, offset3=%d\n",
>                 offset, offset2, offset3);
> --
> 2.28.0
>

Reviewed-by: David Marchand <david.marchand@redhat.com>


-- 
David Marchand


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

* Re: [dpdk-dev] [PATCH] test/mbuf: skip field registration at busy offset
  2020-10-31 14:57 ` David Marchand
@ 2020-10-31 15:04   ` Thomas Monjalon
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2020-10-31 15:04 UTC (permalink / raw)
  To: David Marchand
  Cc: dev, Olivier Matz, Andrew Rybchenko, dpdk stable, Konstantin Ananyev

31/10/2020 15:57, David Marchand:
> On Sat, Oct 31, 2020 at 3:37 PM Thomas Monjalon <thomas@monjalon.net> wrote:
> >
> > There is a test for dynamic field registration at a specific offset.
> > Depending on which driver is probed, some dynamic fields may be
> > already registered at this offset.
> > This failure is skipped with a warning.
> >
> > Fixes: 4958ca3a443a ("mbuf: support dynamic fields and flags")
> > Cc: stable@dpdk.org
> >
> > Reported-by: David Marchand <david.marchand@redhat.com>
> > Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> 
> Reviewed-by: David Marchand <david.marchand@redhat.com>

Applied, thanks




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

end of thread, other threads:[~2020-10-31 15:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-31 14:36 [dpdk-dev] [PATCH] test/mbuf: skip field registration at busy offset Thomas Monjalon
2020-10-31 14:57 ` David Marchand
2020-10-31 15:04   ` 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).