From: David Ahern <dsahern@gmail.com>
To: Parav Pandit <parav@nvidia.com>,
stephen@networkplumber.org, netdev@vger.kernel.org
Subject: Re: [PATCH iproute2-next v2 0/6] Support devlink port add delete
Date: Mon, 1 Feb 2021 20:20:08 -0700 [thread overview]
Message-ID: <2cfa07ec-9997-6286-5352-f723b6ad03c8@gmail.com> (raw)
In-Reply-To: <20210201213551.8503-1-parav@nvidia.com>
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.
next prev parent reply other threads:[~2021-02-02 3:20 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-29 16:56 [PATCH iproute2-next 0/5] Support devlink port add delete Parav Pandit
2021-01-29 16:56 ` [PATCH iproute2-next 1/5] devlink: Update kernel headers Parav Pandit
2021-01-29 16:56 ` [PATCH iproute2-next 2/5] devlink: Introduce PCI SF port flavour and attribute Parav Pandit
2021-01-29 16:56 ` [PATCH iproute2-next 3/5] devlink: Supporting add and delete of devlink port Parav Pandit
2021-01-31 17:26 ` David Ahern
2021-02-01 20:42 ` Parav Pandit
2021-01-29 16:56 ` [PATCH iproute2-next 4/5] devlink: Support get port function state Parav Pandit
2021-01-29 16:56 ` [PATCH iproute2-next 5/5] devlink: Support set of " Parav Pandit
2021-01-31 17:30 ` David Ahern
2021-02-01 20:50 ` Parav Pandit
2021-02-01 21:35 ` [PATCH iproute2-next v2 0/6] Support devlink port add delete Parav Pandit
2021-02-01 21:35 ` [PATCH iproute2-next v2 1/6] devlink: Update kernel headers Parav Pandit
2021-02-01 21:35 ` [PATCH iproute2-next v2 2/6] devlink: Introduce and use string to number mapper Parav Pandit
2021-02-01 21:35 ` [PATCH iproute2-next v2 3/6] devlink: Introduce PCI SF port flavour and attribute Parav Pandit
2021-02-01 21:35 ` [PATCH iproute2-next v2 4/6] devlink: Supporting add and delete of devlink port Parav Pandit
2021-02-01 21:35 ` [PATCH iproute2-next v2 5/6] devlink: Support get port function state Parav Pandit
2021-02-01 21:35 ` [PATCH iproute2-next v2 6/6] devlink: Support set of " Parav Pandit
2021-02-02 3:20 ` David Ahern [this message]
2021-02-02 4:01 ` [PATCH iproute2-next v2 0/6] Support devlink port add delete 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=2cfa07ec-9997-6286-5352-f723b6ad03c8@gmail.com \
--to=dsahern@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=parav@nvidia.com \
--cc=stephen@networkplumber.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).