DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Ravi Kerur <rkerur@gmail.com>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v3] Move rte_mbuf macros to common header file
Date: Wed, 30 Sep 2015 15:13:08 -0700	[thread overview]
Message-ID: <20150930151308.2bfa209a@urahara> (raw)
In-Reply-To: <1443650103-26768-1-git-send-email-rkerur@gmail.com>

On Wed, 30 Sep 2015 14:55:03 -0700
Ravi Kerur <rkerur@gmail.com> wrote:

> +static inline uint64_t rte_mbuf_data_dma_addr(struct rte_mbuf *mb)
> +{
> +	return ((uint64_t)((mb)->buf_physaddr + (mb)->data_off));
> +}
> +
> +static inline uint64_t rte_mbuf_data_dma_addr_default(struct rte_mbuf *mb)
> +{
> +	return ((uint64_t)((mb)->buf_physaddr + RTE_PKTMBUF_HEADROOM));
> +}
> +

Some nits:
  * extra () on return is an unnecessary BSDism
  * cast to (uint64_t) is probably not needed since C  does that anyway.
  * functions should take "const struct rte_mbuf *" since they don't modify it.

      reply	other threads:[~2015-09-30 22:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-30 21:55 Ravi Kerur
2015-09-30 22:13 ` Stephen Hemminger [this message]

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=20150930151308.2bfa209a@urahara \
    --to=stephen@networkplumber.org \
    --cc=dev@dpdk.org \
    --cc=rkerur@gmail.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).