From: Stephen Hemminger <stephen@networkplumber.org>
To: "Verma, Shally" <Shally.Verma@cavium.com>
Cc: "pablo.de.lara.guarch@intel.com" <pablo.de.lara.guarch@intel.com>,
"dev@dpdk.org" <dev@dpdk.org>,
"Athreya, Narayana Prasad" <NarayanaPrasad.Athreya@cavium.com>,
"Challa, Mahipal" <Mahipal.Challa@cavium.com>,
"Gupta, Ashish" <Ashish.Gupta@cavium.com>,
"Sahu, Sunila" <Sunila.Sahu@cavium.com>
Subject: Re: [dpdk-dev] [PATCH v3 4/5] compress/zlib: support burst enqueue/dequeue
Date: Mon, 23 Jul 2018 10:35:57 -0700 [thread overview]
Message-ID: <20180723103557.0c94c4a5@xeon-e3> (raw)
In-Reply-To: <CY4PR0701MB3634D6C72203CEC71EC6EF4EF0560@CY4PR0701MB3634.namprd07.prod.outlook.com>
On Mon, 23 Jul 2018 17:14:26 +0000
"Verma, Shally" <Shally.Verma@cavium.com> wrote:
> >-----Original Message-----
> >From: Stephen Hemminger <stephen@networkplumber.org>
> >Sent: 23 July 2018 22:24
> >To: Verma, Shally <Shally.Verma@cavium.com>
> >Cc: pablo.de.lara.guarch@intel.com; dev@dpdk.org; Athreya, Narayana Prasad <NarayanaPrasad.Athreya@cavium.com>; Challa,
> >Mahipal <Mahipal.Challa@cavium.com>; Gupta, Ashish <Ashish.Gupta@cavium.com>; Sahu, Sunila <Sunila.Sahu@cavium.com>;
> >Sahu, Sunila <Sunila.Sahu@cavium.com>
> >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 <shally.verma@caviumnetworks.com> 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).
next prev parent reply other threads:[~2018-07-23 17:36 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-21 18:17 [dpdk-dev] [PATCH v3 0/5] compress: add ZLIB compression PMD Shally Verma
2018-07-21 18:17 ` [dpdk-dev] [PATCH v3 1/5] compress/zlib: add ZLIB PMD Shally Verma
2018-07-21 18:17 ` [dpdk-dev] [PATCH v3 2/5] compress/zlib: add device PMD ops Shally Verma
2018-07-21 18:17 ` [dpdk-dev] [PATCH v3 3/5] compress/zlib: create private xform Shally Verma
2018-07-21 18:17 ` [dpdk-dev] [PATCH v3 4/5] compress/zlib: support burst enqueue/dequeue Shally Verma
2018-07-23 12:36 ` De Lara Guarch, Pablo
2018-07-23 12:52 ` Verma, Shally
2018-07-23 13:00 ` De Lara Guarch, Pablo
2018-07-23 16:53 ` Stephen Hemminger
2018-07-23 17:14 ` Verma, Shally
2018-07-23 17:35 ` Stephen Hemminger [this message]
2018-07-21 18:17 ` [dpdk-dev] [PATCH v3 5/5] doc: add ZLIB PMD guide Shally Verma
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180723103557.0c94c4a5@xeon-e3 \
--to=stephen@networkplumber.org \
--cc=Ashish.Gupta@cavium.com \
--cc=Mahipal.Challa@cavium.com \
--cc=NarayanaPrasad.Athreya@cavium.com \
--cc=Shally.Verma@cavium.com \
--cc=Sunila.Sahu@cavium.com \
--cc=dev@dpdk.org \
--cc=pablo.de.lara.guarch@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).