From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0C6E4A0471 for ; Mon, 9 Sep 2019 11:01:23 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2D9CC1E956; Mon, 9 Sep 2019 11:01:22 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id E4F3C1E94D for ; Mon, 9 Sep 2019 11:01:20 +0200 (CEST) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Sep 2019 02:01:19 -0700 X-IronPort-AV: E=Sophos;i="5.64,484,1559545200"; d="scan'208";a="335530956" Received: from bricha3-mobl.ger.corp.intel.com ([10.237.221.46]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Sep 2019 02:01:16 -0700 Date: Mon, 9 Sep 2019 10:01:12 +0100 From: Bruce Richardson To: Stephen Hemminger Cc: Honnappa Nagarahalli , olivier.matz@6wind.com, yipeng1.wang@intel.com, sameh.gobriel@intel.com, pablo.de.lara.guarch@intel.com, dev@dpdk.org, pbhagavatula@marvell.com, jerinj@marvell.com Message-ID: <20190909090111.GA1886@bricha3-MOBL.ger.corp.intel.com> References: <20190828144614.25284-1-honnappa.nagarahalli@arm.com> <20190906190510.11146-1-honnappa.nagarahalli@arm.com> <20190906190510.11146-3-honnappa.nagarahalli@arm.com> <20190908204436.52fd804b@xps13> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190908204436.52fd804b@xps13> User-Agent: Mutt/1.11.4 (2019-03-13) Subject: Re: [dpdk-dev] [PATCH v2 2/6] lib/ring: add template to support different element sizes X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Sun, Sep 08, 2019 at 08:44:36PM +0100, Stephen Hemminger wrote: > On Fri, 6 Sep 2019 14:05:06 -0500 > Honnappa Nagarahalli wrote: > > > Add templates to support creating ring APIs with different > > ring element sizes. > > > > Signed-off-by: Honnappa Nagarahalli > > Reviewed-by: Dharmik Thakkar > > Reviewed-by: Gavin Hu > > Reviewed-by: Ruifeng Wang > > Understand the desire for generic code, but macro's are much harder to maintain > and debug. Would it be possible to use inline code taking a size argument > and let compiler optimizations with constant folding do the same thing. > > Sorry, I vote NO for large scale use of macro's. I would tend to agree. This use of macros makes the code very awkward to read and understand.