From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [PATCH v3 4/5] compress/zlib: support burst enqueue/dequeue Date: Mon, 23 Jul 2018 10:35:57 -0700 Message-ID: <20180723103557.0c94c4a5@xeon-e3> References: <1532197069-24224-1-git-send-email-shally.verma@caviumnetworks.com> <1532197069-24224-5-git-send-email-shally.verma@caviumnetworks.com> <20180723095357.5a85b206@xeon-e3> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: "pablo.de.lara.guarch@intel.com" , "dev@dpdk.org" , "Athreya, Narayana Prasad" , "Challa, Mahipal" , "Gupta, Ashish" , "Sahu, Sunila" To: "Verma, Shally" Return-path: Received: from mail-pg1-f179.google.com (mail-pg1-f179.google.com [209.85.215.179]) by dpdk.org (Postfix) with ESMTP id 5215A235 for ; Mon, 23 Jul 2018 19:36:01 +0200 (CEST) Received: by mail-pg1-f179.google.com with SMTP id x5-v6so875897pgp.7 for ; Mon, 23 Jul 2018 10:36:01 -0700 (PDT) In-Reply-To: List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Mon, 23 Jul 2018 17:14:26 +0000 "Verma, Shally" wrote: > >-----Original Message----- > >From: Stephen Hemminger > >Sent: 23 July 2018 22:24 > >To: Verma, Shally > >Cc: pablo.de.lara.guarch@intel.com; dev@dpdk.org; Athreya, Narayana Prasad ; Challa, > >Mahipal ; Gupta, Ashish ; Sahu, Sunila ; > >Sahu, Sunila > >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 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).