mbuf: fix dynamic fields and flags with multiprocess
authorStephen Hemminger <stephen@networkplumber.org>
Wed, 4 Nov 2020 16:20:00 +0000 (08:20 -0800)
committerDavid Marchand <david.marchand@redhat.com>
Wed, 4 Nov 2020 19:47:14 +0000 (20:47 +0100)
commit0429a2e1a445a424b2982f3ce4b3fb34a7d1b796
tree28704ed5b1a90d06f94660e37d9126bfdc3976d8
parent082ac00826b3daa2bd85400990be112972ec8acf
mbuf: fix dynamic fields and flags with multiprocess

The dynamic flag management is broken if rte_mbuf_dynflag_lookup()
is done in a secondary process because the local pointer to
the memzone is not ever initialized.

Fix it by using the same checks as dynfield_register().
I.e if shared memory zone has not been looked up already,
then discover it.

Fixes: 4958ca3a443a ("mbuf: support dynamic fields and flags")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
lib/librte_mbuf/rte_mbuf_dyn.c