Skip to content

Commit

Permalink
test/mbuf: skip field registration at busy offset
Browse files Browse the repository at this point in the history
[ upstream commit 530de86 ]

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: 4958ca3 ("mbuf: support dynamic fields and flags")

Reported-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: David Marchand <david.marchand@redhat.com>
  • Loading branch information
tmonjalo authored and bluca committed Nov 5, 2020
1 parent 4fa4a86 commit edf7486
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions app/test/test_mbuf.c
Original file line number Diff line number Diff line change
Expand Up @@ -2481,9 +2481,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);
Expand Down

0 comments on commit edf7486

Please sign in to comment.