From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ravi Kerur Subject: Re: [PATCH v2] Move rte_mbuf macros to common header file Date: Wed, 30 Sep 2015 14:55:56 -0700 Message-ID: References: <1443640706-3984-1-git-send-email-rkerur@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Cc: "dev@dpdk.org" To: Aaron Conole Return-path: Received: from mail-ob0-f173.google.com (mail-ob0-f173.google.com [209.85.214.173]) by dpdk.org (Postfix) with ESMTP id 8E26D36E for ; Wed, 30 Sep 2015 23:55:57 +0200 (CEST) Received: by obbbh8 with SMTP id bh8so43078700obb.0 for ; Wed, 30 Sep 2015 14:55:57 -0700 (PDT) In-Reply-To: List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Wed, Sep 30, 2015 at 12:41 PM, Aaron Conole wrote: > Ravi Kerur writes: > > > Macros RTE_MBUF_DATA_DMA_ADDR and RTE_MBUF_DATA_DMA_ADDR_DEFAULT > > are defined in each PMD driver file. Move those macros into common > > lib/librte_mbuf/rte_mbuf.h file. PMD drivers include rte_mbuf.h > > file directly/indirectly hence no additionl header file inclusion > > is necessary. > I think this should also mention that they are no longer macros, as > well. > > <> > > --- a/lib/librte_mbuf/rte_mbuf.h > > +++ b/lib/librte_mbuf/rte_mbuf.h > > @@ -843,6 +843,16 @@ struct rte_mbuf { > > uint16_t timesync; > > } __rte_cache_aligned; > > > > +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)); > > +} > > + > I think these names should be made lower case as well. > Thanks, I was waiting for one explicit input on this. I have sent v3 patch.