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 smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (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 DBF33C4345F for ; Thu, 18 Apr 2024 17:25:49 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 8B14181EF3; Thu, 18 Apr 2024 17:25:49 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id YNwpvbULzAu5; Thu, 18 Apr 2024 17:25:47 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.34; helo=ash.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 89C03820A2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1713461147; bh=mHecw+rzO+LWiL74K7/imim+VobAIrmgiBEeiSPPzs8=; h=Date:From:To:References:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=3LtPFBiw8hAXwy6wPmx2mSCGUb1ImNzAlSm6toiYdKJBBj27Thl+DpkJzRxkhdqnb iFwE+6GcblR1DNmWS+paABsObhBAI7OI1UPBml4SGd8un08sk1ZxT08IvqdZiCqEXP 84I7QXVCKoBOYWTCnp0fGilvnmo+e8LAXvQcInqSNl9WGH8AcIdSO5gGRY2bMUHPv7 w78JyxV5z2EFta7fuHoFROyWHFfLU0MSGjuZrxUb0EKsbHIOB6ijwG2d2Dl8oceQMF hRnkb0FAua12EXNDjH/0L3NZzjp4rQ0sM/awCUnhGqUKPXyAeV1qkUnRzF2rM545m0 i+32zVHw2I7og== Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp1.osuosl.org (Postfix) with ESMTP id 89C03820A2; Thu, 18 Apr 2024 17:25:47 +0000 (UTC) Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 4B47E1BF2CD for ; Thu, 18 Apr 2024 17:25:46 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 35BE74155E for ; Thu, 18 Apr 2024 17:25:46 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id SdtJbjqM7Grd for ; Thu, 18 Apr 2024 17:25:44 +0000 (UTC) Received-SPF: None (mailfrom) identity=mailfrom; client-ip=2a00:1450:4864:20::32c; helo=mail-wm1-x32c.google.com; envelope-from=jiri@resnulli.us; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp4.osuosl.org 3C24D4155B DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 3C24D4155B Received: from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com [IPv6:2a00:1450:4864:20::32c]) by smtp4.osuosl.org (Postfix) with ESMTPS id 3C24D4155B for ; Thu, 18 Apr 2024 17:25:42 +0000 (UTC) Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-415515178ceso8869115e9.0 for ; Thu, 18 Apr 2024 10:25:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713461140; x=1714065940; 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=mHecw+rzO+LWiL74K7/imim+VobAIrmgiBEeiSPPzs8=; b=ixmZiX8dxNEjs2lfbGjNAho6PXOFZbCWUKxVHRT73BBrqrlrAoFhJkyaJCt8lp9p1h fpR4l8tVqY3BeMQf383M0Kkx7gXR6NzOPbQbynbXGwrLg7EZkVboGi/M88F6bquH61hR WRZTYMsGhaH0LFl+O2b65LT08AChgXwA8kiWHETS9ln04z3oCEwTRkSdTRAlZfwk6143 flb1MfOSQMoNj1qnjcWjt4WD7cxTwoOTEn4+xYhTMeace5aONPvEZTxe1zMxi7wJSDU9 gl7MbZRv7/xSxhRSLRBcPlvWinMRf7CdjBAtDme5rPxm9Y2JtKgUkuaKFuokry3McTkU TqYA== X-Gm-Message-State: AOJu0Yy9hgtArwv+ZJXzYa3cauaPhT1XCZtXhYe+4+JlgdpF4gKcChuO evCaHXBtn/2+I5RmrjaX09H3MUZYKFkSQm8Vm0LxyPnikonk5PanN/1PBYfeVTU= X-Google-Smtp-Source: AGHT+IGUnOs/6X+o4eoVm7vjfPWuKC7TcN0KjqK38tFoax52+2CFzsdhF0TDeQVPAqauerg+LGf+XQ== X-Received: by 2002:a05:600c:1c91:b0:416:605b:5868 with SMTP id k17-20020a05600c1c9100b00416605b5868mr2314550wms.35.1713461140130; Thu, 18 Apr 2024 10:25:40 -0700 (PDT) Received: from localhost ([193.47.165.251]) by smtp.gmail.com with ESMTPSA id p6-20020a05600c468600b0041563096e15sm7238238wmo.5.2024.04.18.10.25.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Apr 2024 10:25:39 -0700 (PDT) Date: Thu, 18 Apr 2024 19:25:35 +0200 From: Jiri Pirko To: Michal Swiatkowski Message-ID: References: <20240417142028.2171-1-michal.swiatkowski@linux.intel.com> <20240417142028.2171-6-michal.swiatkowski@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=resnulli-us.20230601.gappssmtp.com; s=20230601; t=1713461140; x=1714065940; 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=mHecw+rzO+LWiL74K7/imim+VobAIrmgiBEeiSPPzs8=; b=FWWqmv0mj6vfcANc2R5ML1CC/PA+6ZmF+K/qPRw3ACL+O/89qv887r8QTEzNocHLhf Wy6jNC1JF88SojxA2lvTezTR+KciRGGl5fCWBLUXAbt9ClnrpDwqI+PieTINUhq9An3L bODZcqCmZsr7xIAsK1UZ44s7pZtuxC9+kkZvpIvbz5NpQVXXpaDw1hnrjIsiR05xwb+3 lrKNZo7jI1PZMZOtY53RWPH7yB5Q4sUYgijoWUiWn5/u1l6OQ/v8D5NjfbcZrjUc1ZeC 3980mmOds0q7VWAbcI68KEi+QierF1XMpa86i4w+eouigjy5UtLUCkn+5yQmGqCfOtNh 2iyg== X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dmarc=none (p=none dis=none) header.from=resnulli.us X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dkim=pass (2048-bit key, unprotected) header.d=resnulli-us.20230601.gappssmtp.com header.i=@resnulli-us.20230601.gappssmtp.com header.a=rsa-sha256 header.s=20230601 header.b=FWWqmv0m Subject: Re: [Intel-wired-lan] [iwl-next v4 5/8] ice: allocate devlink for subfunction X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: maciej.fijalkowski@intel.com, mateusz.polchlopek@intel.com, netdev@vger.kernel.org, jiri@nvidia.com, michal.kubiak@intel.com, intel-wired-lan@lists.osuosl.org, pio.raczynski@gmail.com, sridhar.samudrala@intel.com, jacob.e.keller@intel.com, wojciech.drewek@intel.com, przemyslaw.kitszel@intel.com Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" Thu, Apr 18, 2024 at 06:11:38PM CEST, michal.swiatkowski@linux.intel.com wrote: >On Thu, Apr 18, 2024 at 05:43:25PM +0200, Jiri Pirko wrote: >> Thu, Apr 18, 2024 at 04:46:23PM CEST, michal.swiatkowski@linux.intel.com wrote: >> >On Thu, Apr 18, 2024 at 03:02:49PM +0200, Jiri Pirko wrote: >> >> Thu, Apr 18, 2024 at 02:48:53PM CEST, michal.swiatkowski@linux.intel.com wrote: >> >> >On Thu, Apr 18, 2024 at 02:04:21PM +0200, Jiri Pirko wrote: >> >> >> Wed, Apr 17, 2024 at 04:20:25PM CEST, michal.swiatkowski@linux.intel.com wrote: >> >> >> >From: Piotr Raczynski >> >> >> >> >> >> [...] >> >> >> >> >> >> >+/** >> >> >> >+ * ice_allocate_sf - Allocate devlink and return SF structure pointer >> >> >> >+ * @dev: the device to allocate for >> >> >> >+ * >> >> >> >+ * Allocate a devlink instance for SF. >> >> >> >+ * >> >> >> >+ * Return: void pointer to allocated memory >> >> >> >+ */ >> >> >> >+struct ice_sf_priv *ice_allocate_sf(struct device *dev) >> >> >> >> >> >> This is devlink instance for SF auxdev. Please make sure it is properly >> >> >> linked with the devlink port instance using devl_port_fn_devlink_set() >> >> >> See mlx5 implementation for inspiration. >> >> >> >> >> >> >> >> > >> >> >I am going to do it in the last patchset. I know that it isn't the best >> >> >> >> Where? Either I'm blind or you don't do it. >> >> >> >> >> > >> >You told me to split few patches from first patchset [1]. We agree that >> >there will be too many patches for one submission, so I split it into >> >3: >> >- 1/3 devlink prework (already accepted) >> >- 2/3 base subfunction (this patchset) >> >- 3/3 port representor refactor to support subfunction (I am going to >> > include it there) >> >> Sorry, but how is this relevant to my suggestion to use >> devl_port_fn_devlink_set() which you apparently don't? >> > >Devlink port to link with is introduced in the port representor part. >Strange, but it fitted to my splitting. I can move >activation/deactivation part also to this patchset (as there is no >devlink port to call it on) if you want. You have 7 more patches to use in this set. No problem. Please do it all at once. > >> >> > >> >[1] https://lore.kernel.org/netdev/20240301115414.502097-1-michal.swiatkowski@linux.intel.com/ >> > >> >Thanks, >> >Michal >> > >> >> >option to split patchesets like that, but it was hard to do it differently. >> >> > >> >> >Thanks, >> >> >Michal >> >> > >> >> >> >+{ >> >> >> >+ return ice_devlink_alloc(dev, sizeof(struct ice_sf_priv), >> >> >> >+ &ice_sf_devlink_ops); >> >> >> >+} >> >> >> >+ >> >> >> >> >> >> [...] From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4C39B15E20F for ; Thu, 18 Apr 2024 17:25:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.52 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713461145; cv=none; b=jqKjiKEYPhcsbmHlk3HFEnBuBckhVt6bYUKXOuAY9QRs6iqRsYErSz1AvHDAMkpoQwImbtIbueMHQUc4zP29ZAQT+OHvBwFr6VbkUOQanVu0i3JZp3AKkeXGZzRnexPosR+g2NIjkCqFmCTATcooPcZuD9Jm1+Xw9PwYIsucpYI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713461145; c=relaxed/simple; bh=w9SZnApHyBHOUonz8cu+jVtYHycCUgnp9/31l8txaeQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=RldD2GLlmYvLxB898OKS2Xl6zkqSTZj5wowNvnyqHZwWLly6SLKyGDt+NA9dxB/Vm/ERA1SPwVhtHOTpzqsxVIXFHiyrnuiSNCbiuDCiHv85vJ8DOddvrTpVYTfoI/LN+g53M32VZXfYUF90eroORT9/6EqMcWG2E3VtkmWcZK4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=resnulli.us; spf=none smtp.mailfrom=resnulli.us; dkim=pass (2048-bit key) header.d=resnulli-us.20230601.gappssmtp.com header.i=@resnulli-us.20230601.gappssmtp.com header.b=ocDypQjm; arc=none smtp.client-ip=209.85.128.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=resnulli.us Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=resnulli.us Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=resnulli-us.20230601.gappssmtp.com header.i=@resnulli-us.20230601.gappssmtp.com header.b="ocDypQjm" Received: by mail-wm1-f52.google.com with SMTP id 5b1f17b1804b1-415515178ceso8869105e9.0 for ; Thu, 18 Apr 2024 10:25:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=resnulli-us.20230601.gappssmtp.com; s=20230601; t=1713461140; x=1714065940; darn=vger.kernel.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=mHecw+rzO+LWiL74K7/imim+VobAIrmgiBEeiSPPzs8=; b=ocDypQjmLFC8TGN1Gqkyj8fm6OVxgr2zAPaY/1Md+a/UOdtqnyXvdU8RTOTaHfrPC4 eVDBJSVS7mBa6orbe+VMnxv3UgGsNVq5AepG664UFVqlXqr68fJ1E4mYqBysOU6iB9hP nfh38oHkWMoVSxrxSWji8bljfQjZj6wa46kCqSaoIsKSonHrcrYw/lDWDSdbPOw5Me89 FV5/sQY7r7R3X2cWESvQ2pXzg3rbo2A19TUWUmOi3xd8CJMM2ed99DNGlgSWO3uoltcN EoUsI9OmK4JDAe/VtNXrD13CGe9Iu6aLSFvRUI5hUKhTJgfSpEAbNx94/GG4nutwK+Pr EJeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713461140; x=1714065940; 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=mHecw+rzO+LWiL74K7/imim+VobAIrmgiBEeiSPPzs8=; b=wlARCTmtiVBpclHRFKxnKswicf5dP5AP6wdAq736/Gx7F95cAtWir1MGrUYpSoxx33 NC0XMTtA8e5mk5TWWOf45iGmpCqL4+yJ0abP/WhjhCRLaU+1ckBSKzx+Pdp6Tlqf5uym lNgADutffyMRG8XKG+zNDyxLOnYfGKbV1S72bfvIB7v8pNYuvDJfmbS03UWkVm4KCp2X 4Fxd8nPDNu9OJGLWbw4nVE399z+tBS7xBEKwhEh7wzmyDPqPHocSGx6UAbBk0rp9JJH3 evJ2Ak1UbvCxAojdwZr+CNtyAe6arSc6mi+wq19c/Q/qmFvkvCa/ICb9zjE05nCLyyEJ xkeg== X-Forwarded-Encrypted: i=1; AJvYcCUjxeysDH8Ut5axuAdok2EDxTwn7Ene9S9d6w3v9ZuqUiw1eufSuhGn6Q5djsKZBAIFjRbNTTf7aZ3sSNt59mGS+8e/2kFz X-Gm-Message-State: AOJu0YyMVd2+89Eu36TFVitIKRX5g2V83fn2LxhDu9Frv9SdQE/PQpGB pF2EVnZeB0nguuilhpYGqtnGly5PTMe2maAhhDQx1WjkUm50Iqm+J2LP2XJNmmysrWhJcw8cIqT mn3A= X-Google-Smtp-Source: AGHT+IGUnOs/6X+o4eoVm7vjfPWuKC7TcN0KjqK38tFoax52+2CFzsdhF0TDeQVPAqauerg+LGf+XQ== X-Received: by 2002:a05:600c:1c91:b0:416:605b:5868 with SMTP id k17-20020a05600c1c9100b00416605b5868mr2314550wms.35.1713461140130; Thu, 18 Apr 2024 10:25:40 -0700 (PDT) Received: from localhost ([193.47.165.251]) by smtp.gmail.com with ESMTPSA id p6-20020a05600c468600b0041563096e15sm7238238wmo.5.2024.04.18.10.25.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Apr 2024 10:25:39 -0700 (PDT) Date: Thu, 18 Apr 2024 19:25:35 +0200 From: Jiri Pirko To: Michal Swiatkowski Cc: intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org, jacob.e.keller@intel.com, michal.kubiak@intel.com, maciej.fijalkowski@intel.com, sridhar.samudrala@intel.com, przemyslaw.kitszel@intel.com, wojciech.drewek@intel.com, pio.raczynski@gmail.com, jiri@nvidia.com, mateusz.polchlopek@intel.com Subject: Re: [iwl-next v4 5/8] ice: allocate devlink for subfunction Message-ID: References: <20240417142028.2171-1-michal.swiatkowski@linux.intel.com> <20240417142028.2171-6-michal.swiatkowski@linux.intel.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Thu, Apr 18, 2024 at 06:11:38PM CEST, michal.swiatkowski@linux.intel.com wrote: >On Thu, Apr 18, 2024 at 05:43:25PM +0200, Jiri Pirko wrote: >> Thu, Apr 18, 2024 at 04:46:23PM CEST, michal.swiatkowski@linux.intel.com wrote: >> >On Thu, Apr 18, 2024 at 03:02:49PM +0200, Jiri Pirko wrote: >> >> Thu, Apr 18, 2024 at 02:48:53PM CEST, michal.swiatkowski@linux.intel.com wrote: >> >> >On Thu, Apr 18, 2024 at 02:04:21PM +0200, Jiri Pirko wrote: >> >> >> Wed, Apr 17, 2024 at 04:20:25PM CEST, michal.swiatkowski@linux.intel.com wrote: >> >> >> >From: Piotr Raczynski >> >> >> >> >> >> [...] >> >> >> >> >> >> >+/** >> >> >> >+ * ice_allocate_sf - Allocate devlink and return SF structure pointer >> >> >> >+ * @dev: the device to allocate for >> >> >> >+ * >> >> >> >+ * Allocate a devlink instance for SF. >> >> >> >+ * >> >> >> >+ * Return: void pointer to allocated memory >> >> >> >+ */ >> >> >> >+struct ice_sf_priv *ice_allocate_sf(struct device *dev) >> >> >> >> >> >> This is devlink instance for SF auxdev. Please make sure it is properly >> >> >> linked with the devlink port instance using devl_port_fn_devlink_set() >> >> >> See mlx5 implementation for inspiration. >> >> >> >> >> >> >> >> > >> >> >I am going to do it in the last patchset. I know that it isn't the best >> >> >> >> Where? Either I'm blind or you don't do it. >> >> >> >> >> > >> >You told me to split few patches from first patchset [1]. We agree that >> >there will be too many patches for one submission, so I split it into >> >3: >> >- 1/3 devlink prework (already accepted) >> >- 2/3 base subfunction (this patchset) >> >- 3/3 port representor refactor to support subfunction (I am going to >> > include it there) >> >> Sorry, but how is this relevant to my suggestion to use >> devl_port_fn_devlink_set() which you apparently don't? >> > >Devlink port to link with is introduced in the port representor part. >Strange, but it fitted to my splitting. I can move >activation/deactivation part also to this patchset (as there is no >devlink port to call it on) if you want. You have 7 more patches to use in this set. No problem. Please do it all at once. > >> >> > >> >[1] https://lore.kernel.org/netdev/20240301115414.502097-1-michal.swiatkowski@linux.intel.com/ >> > >> >Thanks, >> >Michal >> > >> >> >option to split patchesets like that, but it was hard to do it differently. >> >> > >> >> >Thanks, >> >> >Michal >> >> > >> >> >> >+{ >> >> >> >+ return ice_devlink_alloc(dev, sizeof(struct ice_sf_priv), >> >> >> >+ &ice_sf_devlink_ops); >> >> >> >+} >> >> >> >+ >> >> >> >> >> >> [...]