DPDK patches and discussions
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: Thomas Monjalon <thomas@monjalon.net>
Cc: dev <dev@dpdk.org>, Olivier Matz <olivier.matz@6wind.com>,
	 Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>,
	dpdk stable <stable@dpdk.org>,
	Konstantin Ananyev <konstantin.ananyev@intel.com>
Subject: Re: [dpdk-dev] [PATCH] test/mbuf: skip field registration at busy offset
Date: Sat, 31 Oct 2020 15:57:17 +0100
Message-ID: <CAJFAV8x3CvU+jwUjamHWm+35-17GHrjfvb2UaiKtDokG==uHBA@mail.gmail.com> (raw)
In-Reply-To: <20201031143658.1182715-1-thomas@monjalon.net>

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


  reply	other threads:[~2020-10-31 14:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-31 14:36 Thomas Monjalon
2020-10-31 14:57 ` David Marchand [this message]
2020-10-31 15:04   ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAJFAV8x3CvU+jwUjamHWm+35-17GHrjfvb2UaiKtDokG==uHBA@mail.gmail.com' \
    --to=david.marchand@redhat.com \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=dev@dpdk.org \
    --cc=konstantin.ananyev@intel.com \
    --cc=olivier.matz@6wind.com \
    --cc=stable@dpdk.org \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git