From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751971AbdG2VYe convert rfc822-to-8bit (ORCPT ); Sat, 29 Jul 2017 17:24:34 -0400 Received: from Chamillionaire.breakpoint.cc ([146.0.238.67]:44828 "EHLO Chamillionaire.breakpoint.cc" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751556AbdG2VYc (ORCPT ); Sat, 29 Jul 2017 17:24:32 -0400 Date: Sat, 29 Jul 2017 23:22:35 +0200 From: Florian Westphal To: Julia Lawall Cc: Florian Westphal , "David S. Miller" , bhumirks@gmail.com, kernel-janitors@vger.kernel.org, Pablo Neira Ayuso , Jozsef Kadlecsik , netfilter-devel@vger.kernel.org, coreteam@netfilter.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/1] netfilter: constify nf_conntrack_l3/4proto parameters Message-ID: <20170729212235.GI28392@breakpoint.cc> References: <1501356197-26490-1-git-send-email-Julia.Lawall@lip6.fr> <1501356197-26490-2-git-send-email-Julia.Lawall@lip6.fr> <20170729200343.GH28392@breakpoint.cc> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: 8BIT In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Julia Lawall wrote: > > I think we can indeed constify these completely after making > > 'nla_size' set at compile time. > > > > I'll send a simple attempt to make it so for l3proto soon. > > There is another issue with respect to nf_ct_l3proto_unregister. This > calls nf_ct_iterate_destroy with l3proto as the second argument. This > function has signature: > > void > nf_ct_iterate_destroy(int (*iter)(struct nf_conn *i, void *data), void *data) > > The void * is not const. Maybe it could be. Haven't looked if we can constify it in general, but, as the argument is not going to be written to in this particular case it will not be a showstopper.