Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1502317rwl; Fri, 7 Apr 2023 18:04:24 -0700 (PDT) X-Google-Smtp-Source: AKy350b/dIh+HTjvuR1ZhOKSenTsv9+HXIpB8IIlrnfG11U5dLMJnTVSKSqzHfLBG+rp69Dja0XD X-Received: by 2002:a17:906:3c50:b0:8dd:76d5:a82 with SMTP id i16-20020a1709063c5000b008dd76d50a82mr1002391ejg.47.1680915864228; Fri, 07 Apr 2023 18:04:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680915864; cv=none; d=google.com; s=arc-20160816; b=PDVaddf5j8QNGXNKlFUgd1e0ngRtDOucwCpBWA+eHKL+6v+Yn24FzvujSCVSXUJF4l xWxsREz72NA+plxjKBX/20B6OBlhRcnQFNl2jH/tT7UzrXW6L+LFP6Yz60+PzZySs8Mt jISwHOJrcatlblQvOXMhYChERIF9paL9ZEuro4BqmvumXgR2iEJhZ245qqnU/AV1v6H1 p9qyqT1+pQKTdUI6Pan8DnfqEc46OYSdBdeXya/Xxg+4ViHPAHbE11oXJL7635s2XK7Z /v+xPAGpMawngdjTnKMqwrybQqzoEgjzxGYQF1J9sZ2ZB6489cVerl7d98EniKMRbFHr Dy5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=p62rqMZVEBR07o398sNys6W75SKRP+SH0KJgeB71QNI=; b=DgcaWedC6h/M76E8wxYmHrMZJBj3QY8Z+s2fkBlEOjGMTlU3s6NQa6/Lco1AH7vp8Q eFVrEwFkFEmureLBcYqTRLtlZWOVboyifhhrdaZ/JRmBtZPNc1UbgdLJGwyX9DfhZTvN rnXSimI0LnJwuYEXy8PjyJ3tqCA6r8Abrb5d7oN2gPvQEkdvBQ8YDgeSejJdSlRocxUS gE9OzO5tfD7rwu0ZuZgq4b8kasNq6WcZAHeKVLUPCPM8QvsYT5oUC9GthxtT206SpILP NiwaPP41aKacLso6A5tft/vkSQuGqerm3aO6cUkoewRjNCwB6dUtsaK49XcDtK79cJoT bHFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="gBCPer/e"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ti14-20020a170907c20e00b00949d0e5e8fcsi4382269ejc.39.2023.04.07.18.03.55; Fri, 07 Apr 2023 18:04:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="gBCPer/e"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229523AbjDHBBx (ORCPT + 99 others); Fri, 7 Apr 2023 21:01:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54714 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229437AbjDHBBw (ORCPT ); Fri, 7 Apr 2023 21:01:52 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6AAF2E1BB; Fri, 7 Apr 2023 18:01:51 -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 060A56541E; Sat, 8 Apr 2023 01:01:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4F7AFC4339B; Sat, 8 Apr 2023 01:01:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1680915710; bh=gcSlr0CIOmJ02VidgdW32DQyhRayuccBI+i0cNpKHis=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=gBCPer/ess3XRcujoGPcuezud/xtWezbBNdpdyfAn6mrD2z2blA2PFPhfUgWC3IK+ IXPlzbOs3j3Pavor5adn0jSmofxhNCbZB7mlwvmb7Ryu0cixxiD/nJKaVEhC1tONE7 zGe3Wx2IhamnpzYVFHJBAE5DXR5Kez2dOYsFBkPgALFW8cXsci2LydKyLvzCvRvyvp HTKe7vzVPpNz/+hEZCzb5CKi5VQI6fihLzQhdH+iC24LYAjCKJfaA5u0ZPUntEuCeB pskv7vxlbOCyyKcSRZB97PZf7cnOrhRVme7ByuBOvnNY7mskaunxMqmGUqm0UxQ7nF WcUBI5Ldpdznw== Date: Fri, 7 Apr 2023 18:01:48 -0700 From: Jakub Kicinski To: Vladimir Oltean Cc: Jamal Hadi Salim , Vladimir Oltean , netdev@vger.kernel.org, "David S. Miller" , Eric Dumazet , Paolo Abeni , Cong Wang , Jiri Pirko , Vinicius Costa Gomes , Kurt Kanzenbach , Gerhard Engleder , Amritha Nambiar , Ferenc Fejes , Xiaoliang Yang , Roger Quadros , Pranavi Somisetty , Harini Katakam , Giuseppe Cavallaro , Alexandre Torgue , Michael Sit Wei Hong , Mohammad Athari Bin Ismail , Oleksij Rempel , Jacob Keller , linux-kernel@vger.kernel.org, Ferenc Fejes , Simon Horman Subject: Re: [PATCH v4 net-next 6/9] net/sched: mqprio: allow per-TC user input of FP adminStatus Message-ID: <20230407180148.281307c3@kernel.org> In-Reply-To: <20230407215252.x3lwkhfp4u6vptxl@skbuf> References: <20230403103440.2895683-1-vladimir.oltean@nxp.com> <20230403103440.2895683-7-vladimir.oltean@nxp.com> <20230407164103.vstxn2fmswno3ker@skbuf> <20230407193056.3rklegrgmn2yecuu@skbuf> <20230407215252.x3lwkhfp4u6vptxl@skbuf> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 8 Apr 2023 00:52:52 +0300 Vladimir Oltean wrote: > On Fri, Apr 07, 2023 at 05:40:20PM -0400, Jamal Hadi Salim wrote: > > Yes, it is minor (and usually minor things generate the most emails;->). > > I may be misunderstanding what you mean by "doesnt justify exporting > > something to UAPI" - those definitions are part of uapi and are > > already being exported. > > In my proposed patch set there isn't any TC_FP_MAX. I'm saying it > doesn't help user space, and so, it just pollutes the name space of C > programs with no good reason. +1 we tend to sprinkle MAX and UNSPEC into every enum > > No, no, it is a matter of taste and opinion. You may have noticed, > > trivial stuff like this gets the most comments and reviews normally(we > > just spent like 4-5 emails on this?). Poteto/potato: IOW, if i was to > > do it i would have used a u16 or u32 because i feel it would be more > > readable. I would have used NLA_U8 because i felt it is more fitting > > and i would have used a max value because it would save me one line in > > a patch in the future. I think weve spent enough electrons on this - I > > defer to you. > > Ok, I won't change preemptible_tcs from unsigned long to u32. > Things like for_each_set_bit() take unsigned long, and so, I got used > to using that consistently for small bitfield types. > > If there's a second opinion stating that I should prefer the smallest > netlink attribute type that fits the estimated data, then I'll transition > from NLA_U32 to NLA_U8. Otherwise, I won't :) since I would need to > change iproute2 too, and I'd have to re-test more thoroughly to make > sure I don't introduce stupid bugs. And here also agreed. We should have a patchwork check for new uses of NLA_*{8,16} if you ask me :S NLA_FLAG or NLA_U32, anything in between needs a strong justification. Until Alex L posts the variable size ints, then NLA_FLAG or NLA_UINT ;)