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 9C5AD2BCE for ; Thu, 10 Mar 2016 09:11:58 +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 1advit-0006pK-1j; Thu, 10 Mar 2016 09:13:31 +0100 To: Stephen Hemminger 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> From: Olivier MATZ X-Enigmail-Draft-Status: N1110 Message-ID: <56E12C48.3070107@6wind.com> Date: Thu, 10 Mar 2016 09:11:52 +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: <20160309130159.309e5606@xeon-e3> 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:11:58 -0000 > 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