From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.droids-corp.org (zoll.droids-corp.org [94.23.50.67]) by dpdk.org (Postfix) with ESMTP id E85492BC9 for ; Thu, 10 Mar 2016 09:29:11 +0100 (CET) Received: from was59-1-82-226-113-214.fbx.proxad.net ([82.226.113.214] helo=[192.168.0.10]) by mail.droids-corp.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84) (envelope-from ) id 1advzW-0006pv-SJ; Thu, 10 Mar 2016 09:30:43 +0100 To: Bruce Richardson References: <1457540381-20274-1-git-send-email-olivier.matz@6wind.com> <1457540381-20274-11-git-send-email-olivier.matz@6wind.com> <56E08BE7.6030906@6wind.com> <20160309212232.GB8020@bricha3-MOBL3> From: Olivier MATZ X-Enigmail-Draft-Status: N1110 Message-ID: <56E1304F.1000808@6wind.com> Date: Thu, 10 Mar 2016 09:29:03 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.6.0 MIME-Version: 1.0 In-Reply-To: <20160309212232.GB8020@bricha3-MOBL3> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [RFC 10/35] eal: introduce RTE_DECONST macro 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, 10 Mar 2016 08:29:12 -0000 >> If you have a better alternative, without duplicating the code, >> I'll be happy to learn. > > I really don't like this dropping of const either, but I do see the problem. > I'd nearly rather see two copies of the function than start dropping the const > in such a way. I don't think duplicating the code is a good option. > Also, I'd see having the function itself be a wrapper around a > macro as a better alternative too, assuming such a construction is possible. Sorry, I'm not sure to understand. Could you please elaborate? Regards, Olivier