From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f46.google.com (mail-pa0-f46.google.com [209.85.220.46]) by dpdk.org (Postfix) with ESMTP id ACC0D282 for ; Thu, 1 Oct 2015 00:12:59 +0200 (CEST) Received: by pablk4 with SMTP id lk4so51973101pab.3 for ; Wed, 30 Sep 2015 15:12:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=wWC0DYyHTd6mM7kF6s+5+L7hlmQyyHEBjSH77LfhLNU=; b=btzHZbub0z7oChsCS8QgVSxnpxeETnH8nKHtGQ+yMaCwuZy/SQC3tqQTluokA+vvNY hTdaLYSVERDQQHeWUDn1gypfU0ZFPIDxnCHR9q8fERALG01Mv8O26VAg+60hWnlSWuV3 ylqSzcQTNEIShV1VLfRvZnLTuQ9VWIfAeTWM/j7Zrz7JBJACFlIIVuNreXI6k2NIJBtp pHOv7CuNgOZFV1SuZwcZRW/FE0dJu9bqyZAfBTMwqAHtUGO1lfKm3C58Lgh4JFD2v6lB bpMuolZGCbbMfZ9mFRvyvmGDQFLhM7pKodWwqZ72JQUB2vqTcAZy09zYESme1VMXG+yM XKIQ== X-Gm-Message-State: ALoCoQmpC/HVOs4ImGs31QmNK4QjgLG/mSIyU9dfmAFN9wYv6dBd9+G7pSK9biFMJ/qE+wkEaUmP X-Received: by 10.67.7.137 with SMTP id dc9mr7664755pad.116.1443651179014; Wed, 30 Sep 2015 15:12:59 -0700 (PDT) Received: from urahara (static-50-53-82-155.bvtn.or.frontiernet.net. [50.53.82.155]) by smtp.gmail.com with ESMTPSA id fa14sm2607051pac.8.2015.09.30.15.12.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 30 Sep 2015 15:12:58 -0700 (PDT) Date: Wed, 30 Sep 2015 15:13:08 -0700 From: Stephen Hemminger To: Ravi Kerur Message-ID: <20150930151308.2bfa209a@urahara> In-Reply-To: <1443650103-26768-1-git-send-email-rkerur@gmail.com> References: <1443650103-26768-1-git-send-email-rkerur@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH v3] Move rte_mbuf macros to common header file X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Sep 2015 22:13:00 -0000 On Wed, 30 Sep 2015 14:55:03 -0700 Ravi Kerur 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.