From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [PATCH v1] Move rte_mbuf macros to common header file Date: Thu, 24 Sep 2015 16:25:37 -0700 Message-ID: <20150924162537.3b20ea3a@urahara> References: <1443134987-24700-1-git-send-email-rkerur@gmail.com> <1443135041-24757-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 To: Ravi Kerur Return-path: Received: from mail-pa0-f43.google.com (mail-pa0-f43.google.com [209.85.220.43]) by dpdk.org (Postfix) with ESMTP id 87E498E56 for ; Fri, 25 Sep 2015 01:25:28 +0200 (CEST) Received: by pacex6 with SMTP id ex6so86139884pac.0 for ; Thu, 24 Sep 2015 16:25:27 -0700 (PDT) In-Reply-To: <1443135041-24757-1-git-send-email-rkerur@gmail.com> 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 Thu, 24 Sep 2015 15:50:41 -0700 Ravi Kerur wrote: > 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. All PMD drivers include rte_mbuf.h > file directly/indirectly hence no additionl header file inclusion > is necessary. > > Compiled for: > > x86_64-native-linuxapp-clang > > x86_64-native-linuxapp-gcc > > i686-native-linuxapp-gcc > > x86_64-native-bsdapp-gcc > > x86_64-native-bsdapp-clang > > Tested on: > > x86_64 Ubuntu 14.04, testpmd and 'make test' > > FreeBSD 10.1, testpmd > > Signed-off-by: Ravi Kerur I like the idea, should have been done long ago. My only gripe is that you should do this as inline functions rather than macros. Inline functions are type safe, macros are not.