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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C808BC6FD1C for ; Sat, 25 Mar 2023 03:47:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229632AbjCYDrk (ORCPT ); Fri, 24 Mar 2023 23:47:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48114 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229535AbjCYDrj (ORCPT ); Fri, 24 Mar 2023 23:47:39 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0FE1217158; Fri, 24 Mar 2023 20:47:39 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 8506962D2A; Sat, 25 Mar 2023 03:47:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 993C6C433D2; Sat, 25 Mar 2023 03:47:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1679716057; bh=ilA3dhCgPe1wOY2rXRy8hV3QUqLGzcp2mFREh7fJDHk=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=EzlN7Bvtat39KzzYHrbBbEw4tcxN+eY0qIVKzpC12A0238IDQip73SEgWeLBZiFMe HjlANOukj/m0JAtVibMvIcXRJhzK/zg49FWy1a7R4uk1lZhxoHdaNKezCf1zUgv5kQ c667ErcoUqU6j2+JhxNIQr25nPwKokP6XiY7h7pzU0ohYFbtxWPPppfugjyBmrLm8D o324OKDHI4BaZjHZTj+M+z7C0WF8Lw6/jP6XCDLxLunxgbmlAPS/PtE9H1BJmLU7rt MP4gL8AWbqUbmkN0Y4PUBSw8nelMwoTuzFploZPUkrWd0EHnQXN6ejPv/WHKgbKn2K TdEh5cQQEV2NQ== Date: Fri, 24 Mar 2023 20:47:36 -0700 From: Jakub Kicinski To: Donald Hunter Cc: netdev@vger.kernel.org, "David S. Miller" , Eric Dumazet , Paolo Abeni , Jonathan Corbet , linux-doc@vger.kernel.org, donald.hunter@redhat.com Subject: Re: [PATCH net-next v4 4/7] tools: ynl: Add fixed-header support to ynl Message-ID: <20230324204736.217e622b@kernel.org> In-Reply-To: <20230324191900.21828-5-donald.hunter@gmail.com> References: <20230324191900.21828-1-donald.hunter@gmail.com> <20230324191900.21828-5-donald.hunter@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-doc@vger.kernel.org On Fri, 24 Mar 2023 19:18:57 +0000 Donald Hunter wrote: > diff --git a/Documentation/netlink/genetlink-legacy.yaml b/Documentation/netlink/genetlink-legacy.yaml > index d50c78b9f42d..3b8984122383 100644 > --- a/Documentation/netlink/genetlink-legacy.yaml > +++ b/Documentation/netlink/genetlink-legacy.yaml > @@ -261,6 +261,13 @@ properties: > async-enum: > description: Name for the enum type with notifications/events. > type: string > + # Start genetlink-legacy > + fixed-header: &fixed-header > + description: | > + Name of the structure defininig the optional fixed-length protocol header. This header is Typo in 'defininig', could you also wrap at 80 chars? Old school kernel style. > + placed in a message after the netlink and genetlink headers and before any attributes. > + type: string > + # End genetlink-legacy > class GenlMsg: > - def __init__(self, nl_msg): > + def __init__(self, nl_msg, fixed_header_members = []): spaces around = or no spaces? I don't really know myself but I'm used to having no spaces. > @@ -540,7 +555,7 @@ class YnlFamily(SpecFamily): > print('Unexpected message: ' + repr(gm)) > continue > > - rsp.append(self._decode(gm.raw_attrs, op.attr_set.name)) > + rsp.append(self._decode(gm.raw_attrs, op.attr_set.name) | gm.fixed_header_attrs) nit: also line wrap?