mbuf: check shared memory before dumping dynamic space
authorChengwen Feng <fengchengwen@huawei.com>
Fri, 23 Apr 2021 08:11:04 +0000 (16:11 +0800)
committerThomas Monjalon <thomas@monjalon.net>
Tue, 4 May 2021 17:49:44 +0000 (19:49 +0200)
commitd4902ed31c63b002268e593536b13b84d4fdac9a
treececaba8856f1699bf7e14422595c2ba99ef84d30
parent2231388f21ada57fdc745af9c2e2ed6ec41ead8d
mbuf: check shared memory before dumping dynamic space

Because mbuf dyn shared memory was allocated runtime, so it's
necessary to check validity when dump mbuf dyn info.

Also this patch adds an error logging when init shared memory fail.

Fixes: 4958ca3a443a ("mbuf: support dynamic fields and flags")
Cc: stable@dpdk.org
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
lib/mbuf/rte_mbuf_dyn.c