On Mon, 23 Jul 2018 17:14:26 +0000 "Verma, Shally" <[email protected]> wrote:
> >-----Original Message----- > >From: Stephen Hemminger <[email protected]> > >Sent: 23 July 2018 22:24 > >To: Verma, Shally <[email protected]> > >Cc: [email protected]; [email protected]; Athreya, Narayana Prasad > ><[email protected]>; Challa, > >Mahipal <[email protected]>; Gupta, Ashish > ><[email protected]>; Sahu, Sunila <[email protected]>; > >Sahu, Sunila <[email protected]> > >Subject: Re: [dpdk-dev] [PATCH v3 4/5] compress/zlib: support burst > >enqueue/dequeue > > > >External Email > > > >On Sat, 21 Jul 2018 23:47:48 +0530 > >Shally Verma <[email protected]> wrote: > > > >> -/** Parse comp xform and set private xform/stream parameters */ > >> +/** Compute next mbuf in the list, assign data buffer and length, > >> + * returns 0 if mbuf is NULL > >> + */ > >> +#define COMPUTE_BUF(mbuf, data, len) \ > >> + ((mbuf = mbuf->next) ? \ > >> + (data = rte_pktmbuf_mtod(mbuf, uint8_t *)), \ > >> + (len = rte_pktmbuf_data_len(mbuf)) : 0) > >> + > > > >Could this be an inline not a macro? > [Shally] Again what goes in favour of inline here? Just curious to know if > DPDK has any preferred guidelines regarding this? > > Thanks > Shally Macros have no type checking and are harder to debug. They should only be used when doing generic code (ie template like).

