From mboxrd@z Thu Jan 1 00:00:00 1970 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) 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=Ga+bmnX7uYvd53/uyBbb5ZMiOuKHGtaj2L7MRjDifE0=; b=Qih8cAR7aJhU7HAnpnMtsRUwAscDiHH8jahOhvR3dulDjsBPHQk+/TgqimAaG4qnRF hwKNyBhCg3Vr36/CTwmGWngj+RRfv6iXKfy8l1MFkcc/phaVyrcjQrkWEsHxFEFIggki Kw0vWwWM+2MkTC7YTtrjTN6p9PaZMdPRW3nlchY5hCfiDoHRTcUGolrkG3yg2sszrhzs 7Sah8N2288j7afiiErHLvnqa4h3KH1uud9KaxPOoOJKg2mu4Mwj1tXKpeWGGftt4S95q mIyHSOZ2wtXDgorSXP2PpzJMVZui0m26pMe/i260R66A8ifZjrwDY1us+V5kNmqmO1o1 vBow== X-Gm-Message-State: ALoCoQn25hMjk1CY9hdRwxcB+CK8cdiT6gohceZjqrEcL2YSVrY4u94MIO9C6HMTBdRZup1dEiDs X-Received: by 10.68.139.194 with SMTP id ra2mr2995695pbb.6.1443137127754; Thu, 24 Sep 2015 16:25:27 -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 uy4sm439559pbc.69.2015.09.24.16.25.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 24 Sep 2015 16:25:27 -0700 (PDT) Date: Thu, 24 Sep 2015 16:25:37 -0700 From: Stephen Hemminger To: Ravi Kerur Message-ID: <20150924162537.3b20ea3a@urahara> In-Reply-To: <1443135041-24757-1-git-send-email-rkerur@gmail.com> 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 Subject: Re: [dpdk-dev] [PATCH v1] 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: Thu, 24 Sep 2015 23:25:28 -0000 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.