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 E26C2C04FF8 for ; Thu, 18 Apr 2024 12:49:22 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 90C4A40512; Thu, 18 Apr 2024 12:49:22 +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 mlfjIVKbmMrz; Thu, 18 Apr 2024 12:49:21 +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 BAA54415C4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1713444561; bh=2HqY35xvvXJlcRIjMKxb1Stq2V4MshxuxZszRzRjBXw=; h=Date:From:To:References:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=T8I3FB+kHKnNZe+2n9xuZFyy/IUdX2upRt8LKt/II/6V2tpAN8oEc+Jkfb8VCrKGZ LbT3TTUrXFn15QUcX2/fga5A9eVKmgQ8A7lJN/TUeQrQUyDi/gm/UMz3si/1pTnp3C o5HPWe6w/qUI8I+x1fc7S+E1gg222KS+28USw2MxIf7Rns7LKixwvdrtZl9D3TH0RT +l1ou8zdA9LrCQqk8Q3iMadjjxU4JHlBRBd0gZfAGsQ47SRXw+e8C66kJmVRRfA/iV py6V99vGHpvizMMLLCQD8Zk/T1KQWZQrpJrB/RlptFmGOiwawnwSdpmeoA5yCenp9O gY6ao+TEMKQNA== Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp2.osuosl.org (Postfix) with ESMTP id BAA54415C4; Thu, 18 Apr 2024 12:49:21 +0000 (UTC) Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 7400D1BF373 for ; Thu, 18 Apr 2024 12:49:20 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 5E1C6811F8 for ; Thu, 18 Apr 2024 12:49:20 +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 lqzdclW_zCtt for ; Thu, 18 Apr 2024 12:49:19 +0000 (UTC) Received-SPF: None (mailfrom) identity=mailfrom; client-ip=198.175.65.14; helo=mgamail.intel.com; envelope-from=michal.swiatkowski@linux.intel.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp1.osuosl.org 7606081089 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 7606081089 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.14]) by smtp1.osuosl.org (Postfix) with ESMTPS id 7606081089 for ; Thu, 18 Apr 2024 12:49:19 +0000 (UTC) X-CSE-ConnectionGUID: MCdfLpOAQc29FkV9VdwinA== X-CSE-MsgGUID: 0rOao7ZZRrSt/DpTCUGMBg== X-IronPort-AV: E=McAfee;i="6600,9927,11047"; a="12824972" X-IronPort-AV: E=Sophos;i="6.07,212,1708416000"; d="scan'208";a="12824972" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by orvoesa106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Apr 2024 05:49:18 -0700 X-CSE-ConnectionGUID: gBTlaMjdS/KV7woqN3338A== X-CSE-MsgGUID: 0Gjiugo8Q4evX45T9Z8L8Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,212,1708416000"; d="scan'208";a="23049434" Received: from unknown (HELO mev-dev) ([10.237.112.144]) by fmviesa008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Apr 2024 05:49:15 -0700 Date: Thu, 18 Apr 2024 14:48:53 +0200 From: Michal Swiatkowski To: Jiri Pirko 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/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1713444560; x=1744980560; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=It5CVBJBDHmvLdbhevY3rpHcqCEKRwZ84y+s65qBu+s=; b=mb5buyF+0HSiuzQCSNsqFjPPrId5U/JO9qHv8YuT6ypTi3TPrQ55gcUt vUhiWq8LuAKs9OB7zTbjblrHCx96jbhYtuZrCfeHEeEUKA4ZqD1v1TG3t P2GJUIsLyfnmOCCYe/cCoAMDdIp++rOOu/BVO2Fuks/H7HIrHWOs7ujqz /LH1aCqVBzQXBFz8Kb2ZNAXC5lqjKEmmoDYQNNERinP6yNHdSrFayRlCl 0xFd5uGasaPXGL69zP+/fLHutSd+zoSGcM46jrBQ8qIxMluaiM2JQUtax QIsnRoa3XVoBwE/3L6PqC0Eq88vX9pca0duJNI824eX398VWLtO6r8ZOa g==; X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dmarc=none (p=none dis=none) header.from=linux.intel.com X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=mb5buyF+ 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" 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 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 mgamail.intel.com (mgamail.intel.com [198.175.65.14]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5426537165 for ; Thu, 18 Apr 2024 12:49:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.14 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713444560; cv=none; b=Xb48RdfnLS2JNFV/ZXeyIsQGA3Oznt7l5uDfuElSXUPxmzzmRIOhcgdjAq3fomvHE5Y5ltgpSYyGxmoiR9kKpzWOIhzWnVJBHX3JgSHCvFjodeuOGAuaJxYVU0idckf+hYdOA5aAjNPxMSkaMkVetqjL1zG0DrGHTDy6hEn3zBY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713444560; c=relaxed/simple; bh=It5CVBJBDHmvLdbhevY3rpHcqCEKRwZ84y+s65qBu+s=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=JjMzjiixsLEr3RFbUKUNcRWjx9WgINYDzrJck1PLIzqu9CP6HgX6gQolyPUZsp+1t5xpuUYgrY1vOaJsWZKtn1HKg611rm5TqM9C2KGQsh88pqMWkciuEBzFg7bb4i+khAOdJiTNPqq5SmgegEniP1RoW9pam7roJn4hwb9Q2B4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=JgXctarZ; arc=none smtp.client-ip=198.175.65.14 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="JgXctarZ" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1713444559; x=1744980559; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=It5CVBJBDHmvLdbhevY3rpHcqCEKRwZ84y+s65qBu+s=; b=JgXctarZ+j8867g2/hSIy6zzg93eep/4mw4KH4p+tnC6v2S3XauvOcfu sHHDa5llsUfLHh7HtHlSl6tFJT3H6vag5RkmrZIkgDb8WTaf4QEYnMAU2 AbliV7HWpNwKzItr6fItR5p3dFFVfklHlXyuc/O2SitFfB0rQ6ZP26/3j NNO2iSx32v6Q2bS7LV9l5ZJkE8fPDl4H/gJc/25VGwPc4hmddp/cuPJhE IpkM4KGaLXc4NOi+jdAZYxejbEYHQ+YfGm/xI9fMK2rWJgPA71zPT1fbR JB1QBxzra6vH/0pq3mHhldlfKXj5zpNiepsbUyPJrISlYWXhzmtUFdtmA w==; X-CSE-ConnectionGUID: +IrZvwZtQsqsm76Jbnw+Lg== X-CSE-MsgGUID: 2BuNJN2NRm29otmq3NnzoQ== X-IronPort-AV: E=McAfee;i="6600,9927,11047"; a="12824973" X-IronPort-AV: E=Sophos;i="6.07,212,1708416000"; d="scan'208";a="12824973" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by orvoesa106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Apr 2024 05:49:18 -0700 X-CSE-ConnectionGUID: gBTlaMjdS/KV7woqN3338A== X-CSE-MsgGUID: 0Gjiugo8Q4evX45T9Z8L8Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,212,1708416000"; d="scan'208";a="23049434" Received: from unknown (HELO mev-dev) ([10.237.112.144]) by fmviesa008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Apr 2024 05:49:15 -0700 Date: Thu, 18 Apr 2024 14:48:53 +0200 From: Michal Swiatkowski To: Jiri Pirko 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: 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 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); > >+} > >+ > > [...]