Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp457075rwb; Tue, 29 Nov 2022 00:31:02 -0800 (PST) X-Google-Smtp-Source: AA0mqf7vxkEuSSi18BKgY3wlVDHiYMQad3axRtxgJi9yBdBYkmN///5LJF4ZLaCKmCpZzIZqxE3m X-Received: by 2002:a63:4449:0:b0:477:a5e2:7b78 with SMTP id t9-20020a634449000000b00477a5e27b78mr29345771pgk.322.1669710661715; Tue, 29 Nov 2022 00:31:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669710661; cv=none; d=google.com; s=arc-20160816; b=BAJXn82jYjnW2WVh9wK+3MNW6j+mz/hSMOyODCwiRUDuWUQcA6HpErLt9CHGVNmWnT CFT+MvnpCpOqFqZmrdT+7oUH8hwRpoO1tO/NwQgcI1ZlqznOhqjQzFZa/wYHyJFWv6tZ 1dX0ehRLQlPLFoPur4ByZHFpw4mZBrDQraprVyxc0DQpeQfZ/GGvrLQTI6dKI6nDEv+t fI8ANGc1ALEWyofXIlupCNMNXlrkjAuujRzlLDU9Xxz9+2qL/ZPwIjZLVHYKWbQhNS8o 75Q61cFP/wc9nmGHzwGdbA2HcXipW/2v9oJYbnTUcaG986GJ0/+xphHf2sog7fkjBQLa rCRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Gzwrz5/bgJ69VQ8DIOQyNt2ySo14PkY0Tc1TJ/9BxtU=; b=Fthv/fRv5WhsiBEo1FPBDyjyK/YMnX4UhcnUGGvuy35Oyz7SywTknNu0cQOtVGo1a1 IZPRmhftbrmDVyh7IT/UFUHuAOwu6U27rj1e0ufGKBS7YUdzXhjbnJf6917hTsiNnwpH FmrCj4ddP4OjiYpdTS+LonpxZ7m25ycKHy+s+PTB9sTz3CJyFUCrlXD25iGcZTIwzqNf Xz+zufb7vFxj17izKwiVI5zfYBBVWE9zlQlXum0lOw1jqU5mJdLgQxoYtLdIVj9kYN9Y KisNyR7JSJHoCz0OhWsxHN4G5zi/E2zEMib+I7Bsv2OOd4hkbJVqi/Wxd364zxVtm0rw HhfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@resnulli-us.20210112.gappssmtp.com header.s=20210112 header.b=C3d56Jty; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k9-20020a170902ba8900b001755f43df36si12279985pls.479.2022.11.29.00.30.40; Tue, 29 Nov 2022 00:31:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-crypto-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=@resnulli-us.20210112.gappssmtp.com header.s=20210112 header.b=C3d56Jty; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230155AbiK2IZF (ORCPT + 99 others); Tue, 29 Nov 2022 03:25:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36742 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230200AbiK2IZD (ORCPT ); Tue, 29 Nov 2022 03:25:03 -0500 Received: from mail-ej1-x632.google.com (mail-ej1-x632.google.com [IPv6:2a00:1450:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6247057B45 for ; Tue, 29 Nov 2022 00:25:01 -0800 (PST) Received: by mail-ej1-x632.google.com with SMTP id b2so15605366eja.7 for ; Tue, 29 Nov 2022 00:25:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=resnulli-us.20210112.gappssmtp.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=Gzwrz5/bgJ69VQ8DIOQyNt2ySo14PkY0Tc1TJ/9BxtU=; b=C3d56JtyuNmf974ceEZSavZ1C/FjLRkloGMeX8+h55kDGiXpMMFI1DD4u3feCh4QEE cHA8xuvglY036UQI7H2YQDycFuUAB+Ib26AaNO9jH79I+9iDbRng+Ef7bpZRqFL7xNvT SY8/h8Tq9x1BtXmeT4cenlPJaDiZZKqt7rUqubucGzlpVqsEFbubxrWdx8hjJGh9HFKI VWWvLBBFn5NGDr4OxwMmW2GFst9UcAyIQNWpvHjljD1grLS1hBIkQpasnV1Ykn1nRN8G mHEkyjZbboo827d2YV+/hiHg/UYb6Oq2UWQS3y69VPrqAzY4s2/UVC3JbUtvZ/MrgXD+ NTPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=Gzwrz5/bgJ69VQ8DIOQyNt2ySo14PkY0Tc1TJ/9BxtU=; b=7HmEwht6MaDW+AAGdXLF0MSEN0XGtFAclXo0G99VLiugDbQYKXbH8FtAELU0l13i2Q Y4BWQDFJy3hBGN05HTOYXc8lGugM+u//pTSp1m06GrHtjPX6yKPmVrViYiPZ40tjvs4/ gAluS6+NsD0RvIg8Xe0P8UQxl6/5/W5lwnmmcwVlCF/uW+pO4ZSd/v8vr857VPPZG1sl aUEp5T63rZ19VuuubpmYT3wLgkVufUiwoH2urx4oooQv6SHKPkFE0N7GaoYbWsDNnHRR wAimNBmkjNd0eTHJV0tcNehIIsgnGoUt83tNOav/XCtrFwYqDux5KDl7G1U7f4fsu5si Wz1w== X-Gm-Message-State: ANoB5pl2wQWOkeLhodCtL9kq8ul6xWIUXT+pSthxTFUSEwAOzXm3KPRy DPx32a3/MZScgjkFYL7JwImMK1ZispJ42ZDAxzM= X-Received: by 2002:a17:906:2645:b0:781:d0c1:4434 with SMTP id i5-20020a170906264500b00781d0c14434mr46698718ejc.756.1669710300002; Tue, 29 Nov 2022 00:25:00 -0800 (PST) Received: from localhost ([86.61.181.4]) by smtp.gmail.com with ESMTPSA id sa21-20020a1709076d1500b007aec1b39478sm5874240ejc.188.2022.11.29.00.24.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Nov 2022 00:24:59 -0800 (PST) Date: Tue, 29 Nov 2022 09:24:58 +0100 From: Jiri Pirko To: Vincent Mailhol Cc: Jiri Pirko , netdev@vger.kernel.org, Jakub Kicinski , "David S . Miller" , Eric Dumazet , Paolo Abeni , linux-kernel@vger.kernel.org, Boris Brezillon , Arnaud Ebalard , Srujana Challa , Kurt Kanzenbach , Andrew Lunn , Florian Fainelli , Vladimir Oltean , Michael Chan , Ioana Ciornei , Dimitris Michailidis , Yisen Zhuang , Salil Mehta , Jesse Brandeburg , Tony Nguyen , Sunil Goutham , Linu Cherian , Geetha sowjanya , Jerin Jacob , hariprasad , Subbaraya Sundeep , Taras Chornyi , Saeed Mahameed , Leon Romanovsky , Ido Schimmel , Petr Machata , Simon Horman , Shannon Nelson , drivers@pensando.io, Ariel Elior , Manish Chopra , Jonathan Lemon , Vadim Fedorenko , Richard Cochran , Vadim Pasternak , Shalom Toledo , linux-crypto@vger.kernel.org, intel-wired-lan@lists.osuosl.org, linux-rdma@vger.kernel.org, oss-drivers@corigine.com, Jiri Pirko , Herbert Xu , Hao Chen , Guangbin Huang , Minghao Chi , Shijith Thotton Subject: Re: [PATCH net-next v5 1/4] net: devlink: let the core report the driver name instead of the drivers Message-ID: References: <20221129000550.3833570-1-mailhol.vincent@wanadoo.fr> <20221129000550.3833570-2-mailhol.vincent@wanadoo.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221129000550.3833570-2-mailhol.vincent@wanadoo.fr> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE 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-crypto@vger.kernel.org Tue, Nov 29, 2022 at 01:05:47AM CET, mailhol.vincent@wanadoo.fr wrote: >The driver name is available in device_driver::name. Right now, >drivers still have to report this piece of information themselves in >their devlink_ops::info_get callback function. > >In order to factorize code, make devlink_nl_info_fill() add the driver >name attribute. > >nla_put() does not check if an attribute already exists and >unconditionally reserves new space [1]. To avoid attribute >duplication, clean-up all the drivers which are currently reporting >the driver name in their callback. This para with the link below should be removed, no need for it. Otherwise, code looks fine. Reviewed-by: Jiri Pirko