mbuf: enforce no option for dynamic fields and flags
authorDavid Marchand <david.marchand@redhat.com>
Tue, 12 Oct 2021 19:39:57 +0000 (21:39 +0200)
committerDavid Marchand <david.marchand@redhat.com>
Fri, 15 Oct 2021 08:29:41 +0000 (10:29 +0200)
commite9123c467dbb471a2d41ea896423a81886ef89d7
tree25fc456ebaaea0d9ff8a7aa4b82c6d062310eb72
parentbc1a35fb3f5e08cfd62607a98c1bf8a48c231f5a
mbuf: enforce no option for dynamic fields and flags

As stated in the API, dynamic field and flags should be created with no
additional flag (simply in the API for future changes).

Fix the dynamic flag register helper which was not enforcing it and add
unit tests.

Fixes: 4958ca3a443a ("mbuf: support dynamic fields and flags")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Ray Kinsella <mdr@ashroe.eu>
app/test/test_mbuf.c
lib/mbuf/rte_mbuf_dyn.c