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 smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8BD11CD37B9 for ; Mon, 11 May 2026 11:36:27 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 414336087C; Mon, 11 May 2026 11:36:27 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id UhX47fBUmg7s; Mon, 11 May 2026 11:36:26 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.142; helo=lists1.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 6BC4E60874 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1778499386; bh=HPZurc9+/xqmPXUOQk+tYxGrrKgq/zuz8+mWyO5VOBE=; h=Date:From:To:References:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=71LufVfDzXRtdjRu5B/4SG3DtVYmZFhQ65qEovICasNXDNKDPJCgNCKQXEyB3NVzW 8X3oJ/tk/fKb6hgSnbJH5WIULW69gr3pehcGgesE8jAoWVQU+SamyqhBZk/bQtDnZ9 ojkb5KP3nsiiF0Lq6mFBxr/h9/2CQ7+1aEMcM5hSuTJsUoOG3XGttf+xNHTTjBGrS1 jVz/j8Vf04m/G4YOi2h+5s7LOQJIfQbEQLrF4dxPCjEYrBNb5TL+EnM9vOMMCaBaD6 sI3MRowADiZXa8Mw+4TmVOuyWcxN3gWNNXo1qbiuwdgCIX/Sw/+jFxwa3qzg7av1c9 DU1l6AGUiZ1lA== Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp3.osuosl.org (Postfix) with ESMTP id 6BC4E60874; Mon, 11 May 2026 11:36:26 +0000 (UTC) Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133]) by lists1.osuosl.org (Postfix) with ESMTP id 5F389223 for ; Mon, 11 May 2026 11:36:24 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 4FD9540336 for ; Mon, 11 May 2026 11:36:24 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id 5-S8nLgcFXWR for ; Mon, 11 May 2026 11:36:22 +0000 (UTC) Received-SPF: None (mailfrom) identity=mailfrom; client-ip=2a00:1450:4864:20::336; helo=mail-wm1-x336.google.com; envelope-from=jiri@resnulli.us; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp2.osuosl.org 7DFD84032B DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 7DFD84032B Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) by smtp2.osuosl.org (Postfix) with ESMTPS id 7DFD84032B for ; Mon, 11 May 2026 11:36:19 +0000 (UTC) Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-4891e86fabeso49719415e9.1 for ; Mon, 11 May 2026 04:36:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778499377; x=1779104177; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=HPZurc9+/xqmPXUOQk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655e9.25.1778499376887; Mon, 11 May 2026 04:36:16 -0700 (PDT) Received: from FV6GYCPJ69 ([128.77.52.126]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48e6fffba5fsm173243735e9.2.2026.05.11.04.36.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 May 2026 04:36:16 -0700 (PDT) Date: Mon, 11 May 2026 13:36:11 +0200 From: Jiri Pirko To: Przemek Kitszel Message-ID: References: <20260508124208.11622-1-przemyslaw.kitszel@intel.com> <20260508124208.11622-2-przemyslaw.kitszel@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260508124208.11622-2-przemyslaw.kitszel@intel.com> X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=resnulli-us.20251104.gappssmtp.com; s=20251104; t=1778499377; x=1779104177; darn=lists.osuosl.org; 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=HPZurc9+/xqmPXUOQk+tYxGrrKgq/zuz8+mWyO5VOBE=; b=H60LgBlULExiVfWvDm2WMJmIS7R7DW0M3MBLku7Xh9wmM193Ws1mDjTgnS4+q306HQ JxjWRnyNTIxoFEMBNPT6nm4sI3aCFhW1586KDKbac7i4EgDzz/JQGIyvTiCBeYRX/wvV zEC2ZBKdA5D7v2pqfHZuV/2plT8aMv5W9oDWVPenbO9nVE6aTbD6BJr8qiidQ1CydPSy dlP17ChCxrmAt3klAQpT/gKyMOSzfNwjs/EXx+UCa3HNPcgjhppdmAbsgEERoQ+W6Mn+ k6bTLms75l67FA1xYwEuNtMCoPnrkv6zgDCZ76Up3cnuGT1j3Y37t1Cm5RXAwMtujda6 UKQQ== X-Mailman-Original-Authentication-Results: smtp2.osuosl.org; dmarc=none (p=none dis=none) header.from=resnulli.us X-Mailman-Original-Authentication-Results: smtp2.osuosl.org; dkim=pass (2048-bit key, unprotected) header.d=resnulli-us.20251104.gappssmtp.com header.i=@resnulli-us.20251104.gappssmtp.com header.a=rsa-sha256 header.s=20251104 header.b=H60LgBlU Subject: Re: [Intel-wired-lan] [PATCH iwl-next v1 01/15] devlink, mlx5: add init/fini ops for shared devlink X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eric Dumazet , Tony Nguyen , ananth.s@intel.com, Leon Romanovsky , Vladimir Medvedkin , Aleksandr Loktionov , intel-wired-lan@lists.osuosl.org, timothy.miskell@intel.com, Jacob Keller , Jakub Kicinski , Paolo Abeni , bruce.richardson@intel.com, Lukasz Czapnik , padraig.j.connolly@intel.com, netdev@vger.kernel.org, Mark Bloch , Tariq Toukan , Andrew Lunn , Simon Horman , Michal Swiatkowski , Saeed Mahameed , "David S. Miller" Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" Fri, May 08, 2026 at 02:41:54PM +0200, przemyslaw.kitszel@intel.com wrote: >Add .shd_init() and .shd_fini() ops, that will be called for the first >devlink_shd_get() (to initialize driver' priv data) and on the last >devlink_shd_put() (to allow for the cleanup). Both ops are optional. > >.shd_init() could return an error, which will stop creation of shd >instance. The initializer also gets an additional, optional param, >that driver could use for any needs. > >If any of the callbacks will need to get devlink instance, it could >be accessed by shd_priv_to_devlink(). > >Both callbacks are called with devl_lock held and devlink registered. > >Next commit will make use of the callbacks, another one will make use also >of the non-null additional param (outside of this series). > >Reviewed-by: Aleksandr Loktionov >Signed-off-by: Przemek Kitszel >--- >(v0) first discussed at: >https://lore.kernel.org/netdev/20260325063143.261806-3-przemyslaw.kitszel@intel.com > >v1: remove redundant added blank line (Jiri) >--- > include/net/devlink.h | 26 +++++++++++++ > .../ethernet/mellanox/mlx5/core/sh_devlink.c | 2 +- > net/devlink/sh_dev.c | 38 ++++++++++++++++++- > 3 files changed, 63 insertions(+), 3 deletions(-) > >diff --git a/include/net/devlink.h b/include/net/devlink.h >index bcd31de1f890..5d3a1337bfa1 100644 >--- a/include/net/devlink.h >+++ b/include/net/devlink.h >@@ -1586,6 +1586,30 @@ struct devlink_ops { > struct devlink_rate *parent, > void *priv_child, void *priv_parent, > struct netlink_ext_ack *extack); >+ >+ /** >+ * shd_init: Shared devlink instance initializer >+ * @priv: shd_devlink' priv >+ * @init_param: additional param to pass to driver callback The "param" word still pokes me to the eye. Could we figure out some different name? "init_ctx" perhaps? [...]