From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id ED9E5C12002 for ; Wed, 21 Jul 2021 07:34:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D3F1C606A5 for ; Wed, 21 Jul 2021 07:34:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235024AbhGUGx3 (ORCPT ); Wed, 21 Jul 2021 02:53:29 -0400 Received: from verein.lst.de ([213.95.11.211]:57689 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234991AbhGUGwP (ORCPT ); Wed, 21 Jul 2021 02:52:15 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id 4BA0367373; Wed, 21 Jul 2021 09:32:50 +0200 (CEST) Date: Wed, 21 Jul 2021 09:32:50 +0200 From: Christoph Hellwig To: Arnd Bergmann Cc: netdev@vger.kernel.org, Christoph Hellwig , Arnd Bergmann Subject: Re: [PATCH v5 3/4] net: socket: simplify dev_ifconf handling Message-ID: <20210721073250.GC11257@lst.de> References: <20210720142436.2096733-1-arnd@kernel.org> <20210720142436.2096733-4-arnd@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210720142436.2096733-4-arnd@kernel.org> User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org > The implementation can be simplified further, based on the > knowledge that the dynamic registration is only ever used > > for IPv4. I think dropping register_gifconf (which seems like a nice cleanup!) needs to be a separate prep patch to not make this too confusing. > index e6231837aff5..4727c7a3a988 100644 > --- a/include/linux/compat.h > +++ b/include/linux/compat.h > @@ -104,6 +104,11 @@ struct compat_ifmap { > unsigned char port; > }; > > +struct compat_ifconf { > + compat_int_t ifc_len; /* size of buffer */ > + compat_uptr_t ifcbuf; > +}; > + > #ifdef CONFIG_COMPAT > > #ifndef compat_user_stack_pointer > @@ -326,12 +331,6 @@ typedef struct compat_sigevent { > } _sigev_un; > } compat_sigevent_t; > > -struct compat_if_settings { > - unsigned int type; /* Type of physical device or protocol */ > - unsigned int size; /* Size of the data allocated by the caller */ > - compat_uptr_t ifs_ifsu; /* union of pointers */ > -}; Does this actually compile as-is? It adds a second definition of compat_ifconf but removes the still used compat_if_settings? Maybe it would be a better idea to add a prep patch that makes as much as possible of compat.h available unconditionally instead of all these little moves.