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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 35183C636CC for ; Wed, 8 Feb 2023 11:53:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229930AbjBHLx4 (ORCPT ); Wed, 8 Feb 2023 06:53:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44090 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229457AbjBHLxz (ORCPT ); Wed, 8 Feb 2023 06:53:55 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 69A0B3FF28 for ; Wed, 8 Feb 2023 03:53:54 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 046A561645 for ; Wed, 8 Feb 2023 11:53:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 979DCC433EF; Wed, 8 Feb 2023 11:53:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1675857233; bh=rpmQdY7JoJlyrDvEnmPfVpVEPc6Fxz7By1saEeoFgeE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=gMOA5wo0pF8Jxx/5yhcXFoBSQi/6IovbBtNEgFiUf+u0SHVyR8diIOCE87AaJGDuR OdzUXKKyPwCLMF2Te6kPAM3set51OuUfA+irCGLkZCnVmQJui3uKHvoSgGUQDPq0qW Rqas5XBMzAaQZ/J6tVrlT532ZulhJJw3AwFzNvGMQLzstUQcC2bFvHgU/hS0JXVmHh 2KcODpJdiVX6wDqiY2CimvCKCdW8jlzwk+x6nqhUNcmJGDw7OSgN2+5VSw9OaDZaGK Ceeug64MXtXR+9LnkBGfGnmO2LMmaRt36tMHgESmgUqzgnsQ17PaKyvXtdCF6wXyF0 wqbG06X33pnXg== Date: Wed, 8 Feb 2023 13:53:48 +0200 From: Leon Romanovsky To: Simon Horman Cc: Jakub Kicinski , David Miller , Paolo Abeni , Michael Chan , Andy Gospodarek , Gal Pressman , Saeed Mahameed , Jesse Brandeburg , Tony Nguyen , Edward Cree , Vladimir Oltean , Andrew Lunn , Fei Qin , netdev@vger.kernel.org, oss-drivers@corigine.com Subject: Re: [PATCH/RFC net-next 1/2] devlink: expose port function commands to assign VFs to multiple netdevs Message-ID: References: <20230206153603.2801791-1-simon.horman@corigine.com> <20230206153603.2801791-2-simon.horman@corigine.com> <20230206184227.64d46170@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Wed, Feb 08, 2023 at 12:36:53PM +0100, Simon Horman wrote: > On Wed, Feb 08, 2023 at 01:21:22PM +0200, Leon Romanovsky wrote: > > On Mon, Feb 06, 2023 at 06:42:27PM -0800, Jakub Kicinski wrote: > > > On Mon, 6 Feb 2023 16:36:02 +0100 Simon Horman wrote: > > > > +VF assignment setup > > > > +--------------------------- > > > > +In some cases, NICs could have multiple physical ports per PF. Users can assign VFs to > > > > +different ports. > > > > > > Please make sure you run make htmldocs when changing docs, > > > this will warn. > > > > > > > +- Get count of VFs assigned to physical port:: > > > > + > > > > + $ devlink port show pci/0000:82:00.0/0 > > > > + pci/0000:82:00.0/0: type eth netdev enp130s0np0 flavour physical port 0 splittable true lanes 4 > > > > > > Physical port has VFs? My knee jerk reaction is that allocating > > > resources via devlink is fine but this seems to lean a bit into > > > forwarding. How do other vendors do it? What's the mapping of VFs > > > to ports? > > > > I don't understand the meaning of VFs here. If we are talking about PCI > > VFs, other vendors follow PCI spec "9.3.3.3.1 VF Enable" section, which > > talks about having one bit to enable all VFs at once. All these VFs will > > have separate netdevs. > > Yes, that is the case here too (before and after). > > What we are talking about is the association of VFs to physical ports > (in the case where a NIC has more than one physical port). We have devices with multiple ports too, but don't have such issues. So it will help if you can provide more context here. I'm failing to see connection between physical ports and physical VFs. Are you saying that physical ports are actual PCI VFs, which spans L2 VFs, which you want to assign to another port (PF)? Thanks