[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <BY5PR12MB4322DA258E1C86792FA67C8FDCA09@BY5PR12MB4322.namprd12.prod.outlook.com>
Date: Fri, 22 Jan 2021 03:34:11 +0000
From: Parav Pandit <parav@...dia.com>
To: "Samudrala, Sridhar" <sridhar.samudrala@...el.com>,
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" <netdev@...r.kernel.org>,
"linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>,
"alexander.duyck@...il.com" <alexander.duyck@...il.com>,
"edwin.peer@...adcom.com" <edwin.peer@...adcom.com>,
"dsahern@...nel.org" <dsahern@...nel.org>,
"kiran.patil@...el.com" <kiran.patil@...el.com>,
"jacob.e.keller@...el.com" <jacob.e.keller@...el.com>,
"david.m.ertman@...el.com" <david.m.ertman@...el.com>,
"dan.j.williams@...el.com" <dan.j.williams@...el.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
> From: Samudrala, Sridhar <sridhar.samudrala@...el.com>
> Sent: Friday, January 22, 2021 2:23 AM
>
> 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.
> >
That statement is no longer valid.
Rest of the example covers the sfnum 88 related details and example.
> > $ 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