Received: by 2002:ac8:678b:0:b0:405:464a:c27a with SMTP id b11csp7272qtp; Tue, 1 Aug 2023 11:59:08 -0700 (PDT) X-Google-Smtp-Source: APBJJlEO+wG9w055aQC3P3LspC10V0+1UwC7YOlkgklUtbnp+ewRAWRfMlxsGjOharGCcaiY1g31 X-Received: by 2002:a17:902:7788:b0:1bc:6c8:cde6 with SMTP id o8-20020a170902778800b001bc06c8cde6mr6978033pll.64.1690916347682; Tue, 01 Aug 2023 11:59:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690916347; cv=none; d=google.com; s=arc-20160816; b=u6H/QuLXPzFAylUpzSjQWhQxjUAg4yN5WhCG0QjJl4WUizGhlsHf15qoNsjke4l9lO AfptXyS6+vPRJkaV3EO5uW4LyH5lQ5V2bC7XGhp3dhpEN1yqmqNZdSUAkxfj95z7t7ys 8pBE8iDdJJQnqmOjxV66SqANnn7gJEsMll+8psrYfpBCdgoumaenMLPxhNg8joJjWORZ ql8SvUGRQK7lJlTGTaseh/f6rpGrCn1p+9krnmhwUDR2Zsg+CGBJaQpM2JHnLmPxbi9d I1N+89x5jbHX6PT1QmHagaEeIsjSV1y7JQczJ8XPpOPDPATAHqSb8r0VxvbeBDSscUmt detw== 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=2f3H2Zljk6uCSCHoUhYsoNINRsQAzA+rqBcD9T6ZjQ4=; fh=r0RqBeqT4tSzEtzRyB8/B63G2uZgurw4xE79sDsS8xI=; b=yj//ZxqV7D51dzwxbUVeN+v3PNPpJ/I+4Gg1dYd43cjHVZkbakKerlMueK8akZZj2k vw4CmQBFNJOfUR0trnUxPIK+NImZn32gAKZ18YOv0oS10m1kwHYSmRELdb4a+7nj5536 x5nwO+ESvB8ovw/qorMYVy0mBi8RXy9BNhx1+5uhBnQ4S/I9KC9GyFOAEUG5TyJ95wtN NANNrATadyYaze4FvEkRPwUZ3UHuq2HXJTOZq0GIb+wpVRdB1UNcGikcOCenRq5O3a8n EDo0lYES6IGlRBAbX8sEz/dg7qudjrtJpW6kz47F4vh2AfqfJVaVD1lw3y9/ey3tVa0s 0ANg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=G6oM5htN; 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 i1-20020a170902c94100b001b9d4de4929si6840106pla.575.2023.08.01.11.58.53; Tue, 01 Aug 2023 11:59:07 -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=G6oM5htN; 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 S231684AbjHAR5j (ORCPT + 99 others); Tue, 1 Aug 2023 13:57:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52724 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231876AbjHAR5c (ORCPT ); Tue, 1 Aug 2023 13:57:32 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 634CF1BF9; Tue, 1 Aug 2023 10:57:30 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 957DD61662; Tue, 1 Aug 2023 17:57:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EF40FC433C8; Tue, 1 Aug 2023 17:57:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1690912649; bh=tw2ZYxvTVSxFPFx5zqO5kWykO1CaGqAJdfqNsvzpC+s=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=G6oM5htN3cIsRrR7bpzcSTjQdPLgnDezapGDV1KSaZ4doJvlYGdyNKxk6q4YXSUbI CxMUuFUEoS2Bj5we6fpnM/RPrLAeoHz/wkHPOy+mml1eKJ3soiEiTHEPzOWIN4MciY 9h5CkO9IqjmtiyzvZFgdtSHCVXkCNVX5AkZ7cmQcodS3+8161DRbKZ2mC/uFs0+wan 4rLtLaXq1YH5bnDfc9PBtmv/SNpoyfvDwAXCcKV5efn2vuR7fRl11q1ZgpXBjxlPI6 nV+NJbyITbiSU4IEURk/MkiIBXLXPlC1EERcGTUN1U5oEf7gw/PENFu2rV5kSVqK8I d+Cv4VduRME9g== Date: Tue, 1 Aug 2023 10:57:26 -0700 From: Jakub Kicinski To: Leon Romanovsky Cc: Lin Ma , davem@davemloft.net, edumazet@google.com, pabeni@redhat.com, fw@strlen.de, yang.lee@linux.alibaba.com, jgg@ziepe.ca, markzhang@nvidia.com, phaddad@nvidia.com, yuancan@huawei.com, ohartoov@nvidia.com, chenzhongjin@huawei.com, aharonl@nvidia.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org Subject: Re: [PATCH net v1 1/2] netlink: let len field used to parse type-not-care nested attrs Message-ID: <20230801105726.1af6a7e1@kernel.org> In-Reply-To: <20230801081117.GA53714@unreal> References: <20230731121247.3972783-1-linma@zju.edu.cn> <20230731120326.6bdd5bf9@kernel.org> <20230801081117.GA53714@unreal> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.1 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,T_SCC_BODY_TEXT_LINE 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, 1 Aug 2023 11:11:17 +0300 Leon Romanovsky wrote: > IMHO, you are lowering too much the separation line between simple vs. > advanced use cases. > > I had no idea that my use-case of passing nested netlink array is counted > as advanced usage. Agreed, that's a fair point. I'm guessing it was inspired by the ethtool stats? (Which in hindsight were a mistake on my part.) For the longest time there was no docs or best practices for netlink. We have the documentation and more infrastructure in place now. I hope if you wrote the code today the distinction would have been clearer. If we start adding APIs for various one-(two?)-offs from the past we'll never dig ourselves out of the "no idea what's the normal use of these APIs" hole..