[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <338c82b7-bb73-a793-2fe2-7e48bf0e4178@intel.com>
Date: Thu, 21 Jan 2021 12:52:45 -0800
From: "Samudrala, Sridhar" <sridhar.samudrala@...el.com>
To: Saeed Mahameed <saeed@...nel.org>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Jason Gunthorpe <jgg@...dia.com>
Cc: netdev@...r.kernel.org, linux-rdma@...r.kernel.org,
alexander.duyck@...il.com, edwin.peer@...adcom.com,
dsahern@...nel.org, kiran.patil@...el.com,
jacob.e.keller@...el.com, david.m.ertman@...el.com,
dan.j.williams@...el.com, Parav Pandit <parav@...dia.com>,
Jiri Pirko <jiri@...dia.com>, Vu Pham <vuhuong@...dia.com>,
Saeed Mahameed <saeedm@...dia.com>
Subject: Re: [net-next V9 04/14] devlink: Support get and set state of port
function
On 1/21/2021 12:52 AM, Saeed Mahameed wrote:
> From: Parav Pandit <parav@...dia.com>
>
> devlink port function can be in active or inactive state.
> Allow users to get and set port function's state.
>
> When the port function it activated, its operational state may change
> after a while when the device is created and driver binds to it.
> Similarly on deactivation flow.
>
> To clearly describe the state of the port function and its device's
> operational state in the host system, define state and opstate
> attributes.
>
> Example of a PCI SF port which supports a port function:
> Create a device with ID=10 and one physical port.
Not clear what it means by creating a device with ID=10 and one physical
port?
I only see a SF with sfnum 88 in the following steps.
>
> $ devlink dev eswitch set pci/0000:06:00.0 mode switchdev
>
> $ devlink port show
> pci/0000:06:00.0/65535: type eth netdev ens2f0np0 flavour physical port 0 splittable false
>
> $ devlink port add pci/0000:06:00.0 flavour pcisf pfnum 0 sfnum 88
> pci/0000:08:00.0/32768: type eth netdev eth6 flavour pcisf controller 0 pfnum 0 sfnum 88 external false splittable false
> function:
> hw_addr 00:00:00:00:00:00 state inactive opstate detached
>
> $ devlink port show pci/0000:06:00.0/32768
> pci/0000:06:00.0/32768: type eth netdev ens2f0npf0sf88 flavour pcisf controller 0 pfnum 0 sfnum 88 external false splittable false
> function:
> hw_addr 00:00:00:00:88:88 state inactive opstate detached
>
> $ devlink port function set pci/0000:06:00.0/32768 hw_addr 00:00:00:00:88:88 state active
>
> $ devlink port show pci/0000:06:00.0/32768 -jp
> {
> "port": {
> "pci/0000:06:00.0/32768": {
> "type": "eth",
> "netdev": "ens2f0npf0sf88",
> "flavour": "pcisf",
> "controller": 0,
> "pfnum": 0,
> "sfnum": 88,
> "external": false,
> "splittable": false,
> "function": {
> "hw_addr": "00:00:00:00:88:88",
> "state": "active",
> "opstate": "attached"
> }
> }
> }
> }
>
> Signed-off-by: Parav Pandit <parav@...dia.com>
> Reviewed-by: Jiri Pirko <jiri@...dia.com>
> Reviewed-by: Vu Pham <vuhuong@...dia.com>
> Signed-off-by: Saeed Mahameed <saeedm@...dia.com>
> ---
<snip>
Powered by blists - more mailing lists