Re: [dpdk-dev] [PATCH] mbuf:using sanity checks do not panic on null mbuf

2018-01-08 Thread Jerin Jacob
-Original Message- > Date: Mon, 8 Jan 2018 09:34:23 -0600 > From: Keith Wiles > To: dev@dpdk.org > Subject: [dpdk-dev] [PATCH] mbuf:using sanity checks do not panic on null > mbuf > X-Mailer: git-send-email 2.10.1 > > The rte_pktmbuf_free() allows for NULL

Re: [dpdk-dev] [PATCH] mbuf:using sanity checks do not panic on null mbuf

2018-01-08 Thread Wiles, Keith
> On Jan 8, 2018, at 9:39 AM, Stephen Hemminger > wrote: > > On Mon, 8 Jan 2018 09:34:23 -0600 > Keith Wiles wrote: > >> +if (!m || !f) { >> +fprintf(stderr, "MBUF and/or FILE pointer is NULL\n"); >> +return; >> +} > > Calling with f of NULL is user error, l

Re: [dpdk-dev] [PATCH] mbuf:using sanity checks do not panic on null mbuf

2018-01-08 Thread Stephen Hemminger
On Mon, 8 Jan 2018 09:34:23 -0600 Keith Wiles wrote: > + if (!m || !f) { > + fprintf(stderr, "MBUF and/or FILE pointer is NULL\n"); > + return; > + } Calling with f of NULL is user error, let it still die in fprintf.

[dpdk-dev] [PATCH] mbuf:using sanity checks do not panic on null mbuf

2018-01-08 Thread Keith Wiles
The rte_pktmbuf_free() allows for NULL mbuf pointer, but when sanity check is enabled it will panic with null pointer. Signed-off-by: Keith Wiles --- lib/librte_mbuf/rte_mbuf.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/librte_mbuf/rte_mbuf.c b/lib/librte_