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 60962CA0EC8 for ; Mon, 11 Sep 2023 22:11:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1358322AbjIKWIe (ORCPT ); Mon, 11 Sep 2023 18:08:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33058 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237712AbjIKNLV (ORCPT ); Mon, 11 Sep 2023 09:11:21 -0400 Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A1ED5E9; Mon, 11 Sep 2023 06:11:16 -0700 (PDT) Received: by mail.gandi.net (Postfix) with ESMTPSA id 7F5A21C001B; Mon, 11 Sep 2023 13:09:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1694437874; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=NeifM5Ih+521Ky4D24H4As0XME/ed4hRcIxhZQ8/dgE=; b=IOKTk7Bo1joFyMSyQQe9dQCAEqfFrfp5mky8/tCsgjXhAwX1NbApy3lWmjMyKfVf8RCZCQ CGIYWseGm0QD9rNS7e6zmaXdHsMZgAEAGru4DdTxlIuSyCrIkYym91+tdOLpve2xjcxxNK nGdKKh/H62C05+iTtX52jI8yJ5iB4512pF9LLsT7DZsfmAWsZVXAFwRFV94BRbiyyhoHZe oySapmD0ydh9xZB4RfJUU1PdKO7FE75sRYd9zH3Gmyhr141wVtO6tKZKX2b5WFpmoiWsLc v8EhHsisx91O2t8iRBxtRWQEZu643cdSQB/2Rcb7qDoGHdflI3izj+UrHwFv0w== Date: Mon, 11 Sep 2023 15:09:31 +0200 From: Maxime Chevallier To: Jakub Kicinski Cc: davem@davemloft.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Andrew Lunn , Eric Dumazet , Paolo Abeni , Florian Fainelli , Heiner Kallweit , Russell King , Vladimir Oltean , Oleksij Rempel , =?UTF-8?B?Tmljb2zDsg==?= Veronese , thomas.petazzoni@bootlin.com, Christophe Leroy Subject: Re: [RFC PATCH net-next 0/7] net: phy: introduce phy numbering Message-ID: <20230911150931.2832b266@fedora> In-Reply-To: <20230908084108.36d0e23c@kernel.org> References: <20230907092407.647139-1-maxime.chevallier@bootlin.com> <20230908084108.36d0e23c@kernel.org> Organization: Bootlin X-Mailer: Claws Mail 4.1.1 (GTK 3.24.38; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-GND-Sasl: maxime.chevallier@bootlin.com Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Jakub On Fri, 8 Sep 2023 08:41:08 -0700 Jakub Kicinski wrote: > On Thu, 7 Sep 2023 11:23:58 +0200 Maxime Chevallier wrote: > > - the netlink API would need polishing, I struggle a bit with finding > > the correct netlink design pattern to return variale-length list of u32. > > Think of them as a list, not an array. > > Dump them one by one, don't try to wrap them in any way: > https://docs.kernel.org/next/userspace-api/netlink/specs.html#multi-attr-arrays > People have tried other things in the past: > https://docs.kernel.org/next/userspace-api/netlink/genetlink-legacy.html#attribute-type-nests > but in the end they add constraints and pain for little benefit. Thanks for the pointers, this makes much more sense than my attempt at creating an array. This and your other comment on the .do vs .dump is exactly what I was missing in my understanding of netlink. Maxime