lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <BY5PR12MB43229C7664D0DE29FCB68CE6DCC20@BY5PR12MB4322.namprd12.prod.outlook.com>
Date:   Sat, 19 Dec 2020 05:06:08 +0000
From:   Parav Pandit <parav@...dia.com>
To:     Jakub Kicinski <kuba@...nel.org>
CC:     Saeed Mahameed <saeed@...nel.org>,
        "David S. Miller" <davem@...emloft.net>,
        Jason Gunthorpe <jgg@...dia.com>,
        Leon Romanovsky <leonro@...dia.com>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>,
        David Ahern <dsahern@...nel.org>,
        Jacob Keller <jacob.e.keller@...el.com>,
        "Sridhar Samudrala" <sridhar.samudrala@...el.com>,
        "david.m.ertman@...el.com" <david.m.ertman@...el.com>,
        "dan.j.williams@...el.com" <dan.j.williams@...el.com>,
        "kiran.patil@...el.com" <kiran.patil@...el.com>,
        "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
        Jiri Pirko <jiri@...dia.com>, Vu Pham <vuhuong@...dia.com>,
        Saeed Mahameed <saeedm@...dia.com>
Subject: RE: [net-next v5 05/15] devlink: Support get and set state of port
 function


> From: Jakub Kicinski <kuba@...nel.org>
> Sent: Saturday, December 19, 2020 1:21 AM
> 
> On Thu, 17 Dec 2020 05:46:45 +0000 Parav Pandit wrote:
> > > From: Jakub Kicinski <kuba@...nel.org>
> > > Sent: Thursday, December 17, 2020 5:39 AM
> > >
> > > On Wed, 16 Dec 2020 05:15:04 +0000 Parav Pandit wrote:
> > > > > From: Jakub Kicinski <kuba@...nel.org>
> > > > > Sent: Wednesday, December 16, 2020 6:08 AM
> > > > >
> > > > > On Tue, 15 Dec 2020 01:03:48 -0800 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.
> > > > >
> > > > > So what's the flow device should implement?
> > > > >
> > > > > User requests deactivated, the device sends a notification to
> > > > > the driver bound to the device. What if the driver ignores it?
> > > > >
> > > > If driver ignores it, those devices are marked unusable for new
> allocation.
> > > > Device becomes usable only after it has act on the event.
> > >
> > > But the device remains fully operational?
> > >
> > > So if I'm an admin who wants to unplug a misbehaving "entity"[1] the
> > > deactivate is not gonna help me, it's just a graceful hint?
> > Right.
> > > Is there no need for a forceful shutdown?
> > In this patchset, no. I didn't add the knob for it. It is already at 15 patches.
> > But yes, forceful shutdown extension can be done by the admin in
> > future patchset as,
> >
> > $ devlink port del pci/0000:06:00.0/<port_index> force true
> >
> > ^^^^^^^^ Above will be the extension in control of the admin.
> 
> Can we come up with operational states that would encompass that?
> 
Operational state is read only. Adding more states will likely make user job harder, unless its absolute necessary.
Currently state and operational state definitions cover all the scenario needed.
Only exception is user doesn't have the ability of force delete.
$ devlink port shutdown pci/0000:03:00.0/port_index
Above command will attempt graceful port deletion.

$ devlink port del pci/0000:03:00.0/port_index
Above command will do force deletion.

> The "force true" does not look too clean.
>
I think notion of force to user is more intuitive than above two commands, as its exist for other parts of the system for example 'reboot'.
So no need for flag as true/false. Just force if user wish to do force removal.

> And let's document meaning of the states. We don't want the next vendor to
> just "assume" the states match their own interpretation.
Oh yes, I did document it in the UAPI header file which will be the first place for vendors to look on how to implement get/set.
But I will add this to patch_14 in the devlink 'subfunctions' section documentation.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ