From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Ahern Subject: Re: [PATCH net-next 08/20] rtnetlink: Update rtnl_dump_ifinfo for strict data checking Date: Sun, 7 Oct 2018 19:29:13 -0600 Message-ID: <9ef11e8b-87c9-80d4-c3d6-d9028dd506c1@gmail.com> References: <20181004213355.14899-1-dsahern@kernel.org> <20181004213355.14899-9-dsahern@kernel.org> <20181005175922.4oiwihofhsvcu4ok@brauner.io> <20181007102908.4gdbr7d74untlo7k@brauner.io> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: David Ahern , netdev@vger.kernel.org, davem@davemloft.net, jbenc@redhat.com, stephen@networkplumber.org To: Christian Brauner Return-path: Received: from mail-pl1-f194.google.com ([209.85.214.194]:47072 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726341AbeJHIi1 (ORCPT ); Mon, 8 Oct 2018 04:38:27 -0400 Received: by mail-pl1-f194.google.com with SMTP id v5-v6so9265923plz.13 for ; Sun, 07 Oct 2018 18:29:15 -0700 (PDT) In-Reply-To: <20181007102908.4gdbr7d74untlo7k@brauner.io> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 10/7/18 4:29 AM, Christian Brauner wrote: >> I thought about that, but there is so much overlap - they are mostly >> common. Besides, ifinfomsg is the header for link dumps, and ifinfomsg >> is the one that has been (ab)used for other message types, so strict >> versus lenient does not really have a differentiator for this message >> type - other than checking the elements of the struct. > > It's mostly about the function being extremely long and convoluted. > Having parts moved out into (a) descriptive helper(s) with whatever name > might make this way more readable than it is now especially with the new > handling we need for strict checking. > understood. In the next version I have pushed most of the checking into helpers.