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]
Date:   Mon, 1 Feb 2021 20:20:08 -0700
From:   David Ahern <dsahern@...il.com>
To:     Parav Pandit <parav@...dia.com>, stephen@...workplumber.org,
        netdev@...r.kernel.org
Subject: Re: [PATCH iproute2-next v2 0/6] Support devlink port add delete

On 2/1/21 2:35 PM, Parav Pandit wrote:
> This patchset implements devlink port add, delete and function state
> management commands.
> 
> An example sequence for a PCI SF:
> 
> Set the device in switchdev mode:
> $ devlink dev eswitch set pci/0000:06:00.0 mode switchdev
> 
> View ports in switchdev mode:
> $ devlink port show
> pci/0000:06:00.0/65535: type eth netdev ens2f0np0 flavour physical port 0 splittable false
> 
> Add a subfunction port for PCI PF 0 with sfnumber 88:
> $ 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 splittable false
>   function:
>     hw_addr 00:00:00:00:00:00 state inactive opstate detached
> 
> Show a newly added port:
> $ 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 splittable false
>   function:
>     hw_addr 00:00:00:00:00:00 state inactive opstate detached
> 
> Set the function state to active:
> $ devlink port function set pci/0000:06:00.0/32768 hw_addr 00:00:00:00:88:88 state active
> 
> Show the port in JSON format:
> $ 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,
>             "splittable": false,
>             "function": {
>                 "hw_addr": "00:00:00:00:88:88",
>                 "state": "active",
>                 "opstate": "attached"
>             }
>         }
>     }
> }
> 
> Set the function state to active:
> $ devlink port function set pci/0000:06:00.0/32768 state inactive
> 
> Delete the port after use:
> $ devlink port del pci/0000:06:00.0/32768
> 

applied to iproute2-next.

In the future, please split additions and changes to utility functions
into a separate standalone patch.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ