Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp1554302rwb; Tue, 27 Sep 2022 15:05:52 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4RV05WlnL8Kl5IQtSDhKs0h1rDaIUo0u79cCJT9/E0F5dPsyA6V9+/qgH+bSpij/vXUCFh X-Received: by 2002:a17:907:2719:b0:782:b261:e9eb with SMTP id w25-20020a170907271900b00782b261e9ebmr19902045ejk.104.1664316352692; Tue, 27 Sep 2022 15:05:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664316352; cv=none; d=google.com; s=arc-20160816; b=P6pezI2amqWfBXU9Uar8CZZqdGz6DhwgIg3Ft8DFz7s1cocwPaa085eh/SWOkPxaXp v6U++zD7dDRoO6FE77nORejGcW9eveDT83YFyLBa3kspOWUDa0DaQQS9LFYkpewGqRbO 8esIsbdPWNo1Rl0XJfA5EDtnAznpNaX2TKjA1AiVCwutFzrUiWECDZge41EChcyGfv10 euVxjru2xe1dLQsZpZSDrHVxRHaQo1326zluTs2BN1CEmnb5EPIv6iHqRHiznn2yQMhP uQmES5vcwmuO8zkxIAyIQSrwK4udBlAUFfb0h184eevyTRfYmK/ZRxIm3htHQ3w5Doxg 0p4A== 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=U68vJxwQ/YTU+KXSFwPBDeZULSKEdzmwPhCRYZGpjDM=; b=HDuvt/rqZnYeQolWf9T2PDFSjk8Cl+Z4wt8uWLbYlfYFlaXqUcdFsdcI0KKYHhYmZT MA/8fkkDpGanMG4jxax3bGxRrVRArhgZhfetjAEWFTN9D7ihLiKS3ciHSvq2xFL14MbK a6Up+e05I8cDRrygyhlLx66Lkjt14XB3ldV1/plY+VYGb93FBvAnyiNRLiznAXHpxveD KVwgafiV95Ko7VWOzJ720AS2aq9YMzZzXj0ql+aahX0LNIeMiSsgvvJ2SMsu7/2Pn4gi I7F2WbFG8J7n5JTEqPUy6KlaY6Nt0hp1C9Kx/hQVFDXDP5r9fs9dAYwj9px4db2YsWng aVHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Zb61xfmN; 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 sc15-20020a1709078a0f00b00787796077a0si1504820ejc.429.2022.09.27.15.05.22; Tue, 27 Sep 2022 15:05:52 -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=Zb61xfmN; 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 S231232AbiI0Vcc (ORCPT + 99 others); Tue, 27 Sep 2022 17:32:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36042 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229779AbiI0Vca (ORCPT ); Tue, 27 Sep 2022 17:32:30 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 91417105D50; Tue, 27 Sep 2022 14:32:29 -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 ams.source.kernel.org (Postfix) with ESMTPS id 4C2E1B81DC7; Tue, 27 Sep 2022 21:32:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EDC7CC433C1; Tue, 27 Sep 2022 21:32:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1664314347; bh=SpTVVg5bGfdD6TuPshyPPNiG6lr2nJAW7ejy5Z1c2Bk=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Zb61xfmNPQSQfdjxY6G76uJnWeb9UbUaS1qNNS8VFqPcyJm5bwXourkXKiuXfWpp0 Zk7hKkRDYvNWvskN2fzMgaVa8siV/D63dC1rFIYPTD0iGQ0TXfg4e5qNrv8U0z22df WnBdN5l4fe+ivAy3MNxH7hvoSOMQlWi4nYhkr4RIfcyT2cP9jbZxv8sWedDwqxg2B9 hz7SC7I3fxXxVChdUGLkMcvn81POtfqYq3hC7Mh5LqugdYbVjys0IFq6Ung8uCH0V/ vea8h4Ap2qpjBcfsk/+TaQfPDAk/20AtZG5UtkI9J//91OHbwYArD74vK3sW9kde8v 6UAQjGt1rpXAQ== Date: Tue, 27 Sep 2022 14:32:25 -0700 From: Jakub Kicinski To: Vladimir Oltean Cc: Vladimir Oltean , "netdev@vger.kernel.org" , "David S. Miller" , Eric Dumazet , Paolo Abeni , Xiaoliang Yang , Rui Sousa , Claudiu Manoil , Alexandre Belloni , "UNGLinuxDriver@microchip.com" , Horatiu Vultur , Andrew Lunn , Vivien Didelot , Florian Fainelli , Michael Walle , Vinicius Costa Gomes , Maxim Kochetkov , Colin Foster , Richie Pearn , Kurt Kanzenbach , Jesse Brandeburg , Tony Nguyen , Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , Jamal Hadi Salim , Cong Wang , Jiri Pirko , Gerhard Engleder , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v2 net-next 01/12] net/sched: taprio: allow user input of per-tc max SDU Message-ID: <20220927143225.546ba2b8@kernel.org> In-Reply-To: <20220927212319.pc75hlhsw7s6es6p@skbuf> References: <20220923163310.3192733-1-vladimir.oltean@nxp.com> <20220923163310.3192733-2-vladimir.oltean@nxp.com> <20220926133829.6bb62b8a@kernel.org> <20220927150921.ffjdliwljccusxad@skbuf> <20220927112710.5fc7720f@kernel.org> <20220927212319.pc75hlhsw7s6es6p@skbuf> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham 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 Tue, 27 Sep 2022 21:23:19 +0000 Vladimir Oltean wrote: > On Tue, Sep 27, 2022 at 11:27:10AM -0700, Jakub Kicinski wrote: > > I know, that's what I expected you'd say :( > > You'd need a reverse parser which is a PITA to do unless you have > > clearly specified bindings. > > I think you're underestimating the problem, it's worse than PITA. My A > still hurts and yet I couldn't find any way in which reverse parsing the > bad netlink attribute is in any way practical in iproute2, other than > doing it to prove a point that it's possible. Yup, iproute2 does not have policy tables, so it's hard. Once you have tables like this: https://github.com/kuba-moo/ynl/blob/main/tools/net/ynl/generated/ethtool-user.c#L22 all linking up the types, it's fairly easy to reverse parse: https://github.com/kuba-moo/ynl/blob/main/tools/net/ynl/lib/ynl.c#L75 Admittedly I haven't added parsing of the bounds yet so it'd just say "invalid argument .bla.something" not "argument out of range .bla.something (is: X, range N-M)" but that's just typing. > > I'd rather you kept the code as is than make precedent for adding both > > string and machine readable. If we do that people will try to stay on > > the safe side and always add both. > > > > The machine readable format is carries all the information you need. > > Nope, the question "What range?" still isn't answered via the machine > readable format. Just "What integer?". Hm, doesn't NLMSGERR_ATTR_POLICY contain the bounds? > > It's just the user space is not clever enough to read it which is, > > well, solvable. > > You should come work at NXP, we love people who keep a healthy dose of > unnecessary complexity in things :) Ha! :D > Sometimes, "not clever enough" is just fine. Yup, go ahead with just the strings. "We'll get there" for the machine readable parsing, hopefully, once my YAML descriptions come...