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 smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (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 27D06C4345F for ; Thu, 18 Apr 2024 13:03:09 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id E04E740542; Thu, 18 Apr 2024 13:03:08 +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 EKrXuQsc1AzH; Thu, 18 Apr 2024 13:03:05 +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 smtp2.osuosl.org 0677B416A9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1713445385; bh=1EtvARd3LNiKuseaLsK3AxuTAIqX4rdxJ4FBJML0okc=; h=Date:From:To:References:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=9dJ6Watpra2ICWCRBT252aaNjcHTuQxoE/bxaP3Pz1qNc+8ucAVMDagnt1bmRsrau NiU1HJryDGe4+pBRiHXvlo7HuzllAPxs0dtD3Dnv2F6ai5zL0y6HDkG76CyPzldejz GIrt+vBTNrdy1ID9SQteVt4jAWZ7KiXZGTUEbnMRpFX5NsHuOIGI2jitEKHLU/UPtt K5BpyncObYtEdTYrmVWqGJJIESFbxST0QP90JD0sDkm9Xua7FqFwCsAMKJDO5FFF/n dYn6W2EIzh1geVBRniZfklGsXyn6qg1lNzsUEwjDWfdO2ApuiVixnQjgehmjda19hI FFQgmmr1Y4byw== Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp2.osuosl.org (Postfix) with ESMTP id 0677B416A9; Thu, 18 Apr 2024 13:03:05 +0000 (UTC) Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 972F11BF373 for ; Thu, 18 Apr 2024 13:03:03 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 8336D60905 for ; Thu, 18 Apr 2024 13:03:03 +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 M83OhCrqK4zQ for ; Thu, 18 Apr 2024 13:02:59 +0000 (UTC) Received-SPF: None (mailfrom) identity=mailfrom; client-ip=2a00:1450:4864:20::42b; helo=mail-wr1-x42b.google.com; envelope-from=jiri@resnulli.us; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp3.osuosl.org 428346062E DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 428346062E Received: from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com [IPv6:2a00:1450:4864:20::42b]) by smtp3.osuosl.org (Postfix) with ESMTPS id 428346062E for ; Thu, 18 Apr 2024 13:02:57 +0000 (UTC) Received: by mail-wr1-x42b.google.com with SMTP id ffacd0b85a97d-34665dd7610so394776f8f.3 for ; Thu, 18 Apr 2024 06:02:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713445375; x=1714050175; 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=1EtvARd3LNiKuseaLsK3AxuTAIqX4rdxJ4FBJML0okc=; b=eqEFEs91q3ablbzXLnugknVdfEdVjgccpaU0kNq/RDd6bdGeuLqFITipX5mFP58nGe 2FZIMhRpjbiRFakbOfHhvP8cw87vxVcOSUnJsdeRlDeUZx4oyUtNsvaST28r60cWpDxv BPRhXlvtVj2tehhSMQJR9sPhYlzUHVfc+90R7QxBmtPqmuEyvVMuRa2U9KaOZGUIDEEI 8VDGr5hJYG2PKVC4JFuF8PHCOVTYGMhtX0OSB0o9FCcxNnbedfHXJKQ477dYNvSJIYXs YOuZxyWhaDBOYhyGmlUbpkmysM+2v43w2Cw3FF1zYvw77v/5kCDj+ozd7xhXjQgciVjC k4aA== X-Gm-Message-State: AOJu0YzJHQr+XdA+9daOKbisLOYv1UYIZ6RPAMx/NjGK2+7JIAIhz8Ij yfQuuRuW1dlGmSomgNkqGwTq11Wt0tb2hSpNuAbMvnFcQmIlVzfadhnDsjQx4yw= X-Google-Smtp-Source: AGHT+IEhPAVXWXhk09rCMXcAkKygM5NW7vUYRMs+Xdl9WLBb+h1dXhG56C/WpvIJLOujdDLTkptYvA== X-Received: by 2002:a05:6000:400e:b0:34a:3148:47f2 with SMTP id cp14-20020a056000400e00b0034a314847f2mr446938wrb.18.1713445375376; Thu, 18 Apr 2024 06:02:55 -0700 (PDT) Received: from localhost ([193.47.165.251]) by smtp.gmail.com with ESMTPSA id b16-20020a5d40d0000000b00346406a5c80sm1791455wrq.32.2024.04.18.06.02.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Apr 2024 06:02:53 -0700 (PDT) Date: Thu, 18 Apr 2024 15:02:49 +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=1713445375; x=1714050175; 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=1EtvARd3LNiKuseaLsK3AxuTAIqX4rdxJ4FBJML0okc=; b=2xfVs1ZzdG/WX7mb/gGVZGS6mUeRtHXx9NiJnVz6qKSKKsVMSqgxtEux+bMZdDYYZc pNUH0gqh3UGiNmO4oB+HNgvcO8tTtoxgAJ1glNPY5GE1Rj+HBqWlE76qkhDpS3QTYZpo k05YRtCbraU+AbYZ9NzboNmG2q7e2J8iFRJKuXmk9qZtVvfF4atrN+RCv3sySOocQsPl EK6M8wE8VfI68cvx1BobcGf2IlWZpC0RnaNMB0EIk2ZargKnUxiTi3yqg9fmr/jE4hlm YYsraX3v7PySpD/l0QBvFXfjfwNkwyPbhv5Whz0uzlj6PeR5SGchk9xUYZ1YUbcEAW1b vQVg== X-Mailman-Original-Authentication-Results: smtp3.osuosl.org; dmarc=none (p=none dis=none) header.from=resnulli.us X-Mailman-Original-Authentication-Results: smtp3.osuosl.org; dkim=pass (2048-bit key) header.d=resnulli-us.20230601.gappssmtp.com header.i=@resnulli-us.20230601.gappssmtp.com header.a=rsa-sha256 header.s=20230601 header.b=2xfVs1Zz 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 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. >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-f54.google.com (mail-wm1-f54.google.com [209.85.128.54]) (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 1F10D1442E3 for ; Thu, 18 Apr 2024 13:02:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.54 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713445382; cv=none; b=PS1CJZGWTO8j6usE4Lpt8rAjsSn8J4eK3+OutD2tj1MBs0yqV2P55RTFhrqnvEGtX+lrG61H9XW4n4PKrfm04nCkDR0jst1lam+mRxR9PETlPbhmv2Ep5UkzRwPFxuX7gh1VJcvXbG8J16uHHuIe5CKdfpZwzCiOWBtVoj6Qr/M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713445382; c=relaxed/simple; bh=IIo/O0ksaEcToCeBEhuz28y/cPSHvOHeMuu1BA1ATUk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ZVe1o0IkY3YSKh9D7r4/GgT55TgRVewZj2+DOsKISVw3HaZKJB6b8EL9Mmm7zPyzv9gXSUWcmyx+ztYxJ3Szay/ApTLAQWlbeTC5QJECvP343r2vgqLXCa0KzpzPMwo3mqFqx/JH22PMiECo7S1nQglaJlJW1LT394TSb/d6bmc= 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=r6C12IyW; arc=none smtp.client-ip=209.85.128.54 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="r6C12IyW" Received: by mail-wm1-f54.google.com with SMTP id 5b1f17b1804b1-418c979ddf3so6675315e9.0 for ; Thu, 18 Apr 2024 06:02:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=resnulli-us.20230601.gappssmtp.com; s=20230601; t=1713445375; x=1714050175; 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=1EtvARd3LNiKuseaLsK3AxuTAIqX4rdxJ4FBJML0okc=; b=r6C12IyWxOhRw5cCJiWlc0zXjIfG4+u1R3NOaeRWgl8JhS2ndoUGNCU/H7VheSflWt Csae22aFLsYrve3IIinDsSdkqlqimATZNR76dQ3xWyJvhhPVu9GjRg93nhpr08WhIVNm DWJgypyum0QGK4oGzf880lXlrwNf47GaVRvHvgtF1oIAeAe4BS7oWhwkfJrJ6UDGBqyo brkJpm4rbr5Iub+KxHDBxDc2LtW2p8aBtwytaSNasAxBgAM1HlZw/8a4Gawn8mofMzej 8nmzstbCTQCoHmDwDnfvptedqqZuiJCCMx32/+f97I0d/Binmh1vpKcS36nP/71TYo5F F5Ug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713445375; x=1714050175; 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=1EtvARd3LNiKuseaLsK3AxuTAIqX4rdxJ4FBJML0okc=; b=JMfnaMm7p3CgbxrKQLgIaRxA80s7BBVbOJuE/v7hUdBKpmW4JEAeERx1ApU8gjc8HU Gz4PR4Y3WzuN6llnIblCVfLjK4IZSpvwCapTVBiZJbOJwbx+MPXljGAKIQTCy/dP+r0y x/hoxFNxhWuMbgNvKS0K7pnTlGh05yzs2Sis6xq6slX9eDkjnfsAiNtfUMPV9CEFPoBv c8QPzvkjhz1KwCoA2nWUzwHik0YJ7+n6GRyBGuo+5QviVmxvZKVL7y+x8ykjIUA7VfpD F1avEUukzhPnB6MnxH7R52ZSuaMDNeDbl0vFpTA+7ZhZhRz23/BqLpRKiT8smgcKpNgS 2UJg== X-Forwarded-Encrypted: i=1; AJvYcCU4dLPMg4n/K7cj5M7ZtQ4fUoq9xixTOnjXp6iukGUtb+ZrC9lw3zoGdf4gNoNH++BADmreVpO5g7YIx+QKL/Q7gK1Zfpen X-Gm-Message-State: AOJu0Yxs8MbSmhSa/z10SY+ksb3E8JT1XlBbk58YxPI59OQLA9VLuZ8g N3yUVd3Rtyr7OqaP8PbESOQw94qrYVXjLs7yWkhTwUscZZizA5beh8ld6T6ogUA= X-Google-Smtp-Source: AGHT+IEhPAVXWXhk09rCMXcAkKygM5NW7vUYRMs+Xdl9WLBb+h1dXhG56C/WpvIJLOujdDLTkptYvA== X-Received: by 2002:a05:6000:400e:b0:34a:3148:47f2 with SMTP id cp14-20020a056000400e00b0034a314847f2mr446938wrb.18.1713445375376; Thu, 18 Apr 2024 06:02:55 -0700 (PDT) Received: from localhost ([193.47.165.251]) by smtp.gmail.com with ESMTPSA id b16-20020a5d40d0000000b00346406a5c80sm1791455wrq.32.2024.04.18.06.02.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Apr 2024 06:02:53 -0700 (PDT) Date: Thu, 18 Apr 2024 15:02:49 +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 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. >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); >> >+} >> >+ >> >> [...]