From: Parav Pandit <parav@nvidia.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"davem@davemloft.net" <davem@davemloft.net>,
"jacob.e.keller@intel.com" <jacob.e.keller@intel.com>,
Jiri Pirko <jiri@nvidia.com>
Subject: RE: [PATCH net-next v4] devlink: Add devlink port documentation
Date: Mon, 7 Dec 2020 04:46:14 +0000 [thread overview]
Message-ID: <BY5PR12MB43227128D9DEDC9E41744017DCCE0@BY5PR12MB4322.namprd12.prod.outlook.com> (raw)
In-Reply-To: <20201205122717.76d193a2@kicinski-fedora-pc1c0hjn.DHCP.thefacebook.com>
> From: Jakub Kicinski <kuba@kernel.org>
> Sent: Sunday, December 6, 2020 1:57 AM
>
> On Thu, 3 Dec 2020 20:02:55 +0200 Parav Pandit wrote:
> > Added documentation for devlink port and port function related commands.
> >
> > Signed-off-by: Parav Pandit <parav@nvidia.com>
> > Reviewed-by: Jiri Pirko <jiri@nvidia.com>
> > Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
>
> > +============
> > +Devlink Port
> > +============
> > +
> > +``devlink-port`` is a port that exists on the device.
>
> Can we add something like:
>
> Each port is a logically separate ingress/egress point of the device.
>
> ?
This may not be true when both physical ports are under bond.
>
> > A devlink port can
> > +be of one among many flavours. A devlink port flavour along with port
> > +attributes describe what a port represents.
> > +
> > +A device driver that intends to publish a devlink port sets the
> > +devlink port attributes and registers the devlink port.
> > +
> > +Devlink port types are described below.
>
> How about:
>
> Physical ports can have different types based on the link layer:
>
Ok. will add.
> > +.. list-table:: List of devlink port types
> > + :widths: 23 90
> > +
> > + * - Type
> > + - Description
> > + * - ``DEVLINK_PORT_TYPE_ETH``
> > + - Driver should set this port type when a link layer of the port is Ethernet.
> > + * - ``DEVLINK_PORT_TYPE_IB``
> > + - Driver should set this port type when a link layer of the port is InfiniBand.
>
> Please wrap at 80 chars.
>
Ack.
> > + * - ``DEVLINK_PORT_TYPE_AUTO``
> > + - This type is indicated by the user when user prefers to set the port type
> > + to be automatically detected by the device driver.
>
> How about:
>
> This type is indicated by the user when driver should detect the port type
> automatically.
>
Will change.
> > +A controller consists of one or more PCI functions.
>
> This need some intro. Like:
>
> PCI controllers
> ---------------
>
> In most cases PCI devices will have only one controller, with potentially multiple
> physical and virtual functions. Devices connected to multiple CPUs and
> SmartNICs, however, may have multiple controllers.
>
> > Such PCI function consists
> > +of one or more networking ports.
>
> PCI function consists of networking ports? What do you mean by a networking
> port? All devlink ports are networking ports.
>
I am not sure this document should be a starting point to define such restriction.
> > A networking port of such PCI function is
> > +represented by the eswitch devlink port.
>
> What's eswitch devlink port? It was never defined.
Eswitch devlink port is the port which sets eswitch attributes (id and length).
>
> > A devlink instance holds ports of two
> > +types of controllers.
>
> For devices with multiple controllers we can distinguish...
>
Yes, will change.
> > +(1) controller discovered on same system where eswitch resides:
> > +This is the case where PCI PF/VF of a controller and devlink eswitch
> > +instance both are located on a single system.
>
> How is eswitch located on a system? Eswitch is in the NIC
>
Yes, I meant eswitch devlink instance and controller devlink instance are same.
Will rephase.
> I think you should say refer to eswitch being controlled by a system.
>
> > +(2) controller located on external host system.
> > +This is the case where a controller is in one system and its devlink
> > +eswitch ports are in a different system. Such controller is called
> > +external controller.
>
> > +An example view of two controller systems::
> > +
> > +Port function configuration
> > +===========================
> > +
> > +When a port flavor is ``DEVLINK_PORT_FLAVOUR_PCI_PF`` or
> > +``DEVLINK_PORT_FLAVOUR_PCI_VF``, it represents the networking port of
> > +a PCI function.
>
> Networking port of a PCI function?
>
> > A user can configure the port function attributes
>
> port function attributes?
>
> > before
> > +enumerating the function.
>
> What does this mean? What does enumerate mean in this context?
>
Enumerate means before creating the device of the function.
However today due to SR-IOV limitation, it is before probing the function device.
> > For example user may set the hardware address of
> > +the function represented by the devlink port function.
>
> What's a hardware address? You mean MAC address?
Yes, MAC address.
Port function attribute is named as hardware address to be generic enough similar to other iproute2 tools.
next prev parent reply other threads:[~2020-12-07 4:47 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-30 16:41 [PATCH net-next] devlink: Add devlink port documentation Parav Pandit
2020-11-30 19:29 ` Jacob Keller
2020-11-30 19:51 ` Parav Pandit
2020-11-30 20:00 ` [PATCH net-next v2] " Parav Pandit
2020-11-30 20:27 ` Keller, Jacob E
2020-12-02 1:34 ` Jakub Kicinski
2020-12-02 4:27 ` Parav Pandit
2020-12-02 13:53 ` [PATCH net-next v3] " Parav Pandit
2020-12-03 2:27 ` Randy Dunlap
2020-12-03 5:06 ` Parav Pandit
2020-12-03 18:02 ` [PATCH net-next v4] " Parav Pandit
2020-12-03 20:31 ` Randy Dunlap
2020-12-05 20:27 ` Jakub Kicinski
2020-12-07 4:46 ` Parav Pandit [this message]
2020-12-07 17:40 ` Jakub Kicinski
2020-12-07 20:00 ` Parav Pandit
2020-12-07 20:12 ` Jakub Kicinski
2020-12-07 20:16 ` Parav Pandit
2020-12-07 22:13 ` [PATCH net-next v5] " Parav Pandit
2020-12-08 1:14 ` Randy Dunlap
2020-12-08 5:59 ` Parav Pandit
2020-12-08 6:51 ` Parav Pandit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=BY5PR12MB43227128D9DEDC9E41744017DCCE0@BY5PR12MB4322.namprd12.prod.outlook.com \
--to=parav@nvidia.com \
--cc=davem@davemloft.net \
--cc=jacob.e.keller@intel.com \
--cc=jiri@nvidia.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).