From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olivier MATZ Subject: Re: [RFC 10/35] eal: introduce RTE_DECONST macro Date: Thu, 10 Mar 2016 09:11:52 +0100 Message-ID: <56E12C48.3070107@6wind.com> 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> <20160309130159.309e5606@xeon-e3> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: "dev@dpdk.org" To: Stephen Hemminger Return-path: Received: from mail.droids-corp.org (zoll.droids-corp.org [94.23.50.67]) by dpdk.org (Postfix) with ESMTP id 9C5AD2BCE for ; Thu, 10 Mar 2016 09:11:58 +0100 (CET) In-Reply-To: <20160309130159.309e5606@xeon-e3> 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" > I would rather have the mempool_audit code take a non-const argument. > The macro method sets a bad precedent and will encourage more bad code. > Plus code checkers are likely to flag any such usage as suspect. Doing that would imply dropping the const qualifier in several functions: - rte_mempool_dump() - rte_mempool_audit() - mempool_audit_cookies() - mempool_audit_cache() This is maybe acceptable, but I think it is more important to keep a const in the API, explicitly saying to the API user that this parameter is read only. Olivier