netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/9] devlink vdev
@ 2019-10-22 17:43 Yuval Avnery
  2019-10-22 17:43 ` [PATCH net-next 1/9] devlink: Introduce vdev Yuval Avnery
                   ` (10 more replies)
  0 siblings, 11 replies; 24+ messages in thread
From: Yuval Avnery @ 2019-10-22 17:43 UTC (permalink / raw)
  To: netdev; +Cc: jiri, saeedm, leon, davem, jakub.kicinski, shuah, Yuval Avnery

This patchset introduces devlink vdev.

Currently, legacy tools do not provide a comprehensive solution that can
be used in both SmartNic and non-SmartNic mode.
Vdev represents a device that exists on the ASIC but is not necessarily
visible to the kernel.

Using devlink ports is not suitable because:

1. Those devices aren't necessarily network devices (such as NVMe devices)
   and doesn’t have E-switch representation. Therefore, there is need for
   more generic representation of PCI VF.
2. Some attributes are not necessarily pure port attributes
   (number of MSIX vectors)
3. It creates a confusing devlink topology, with multiple port flavours
   and indices.

Vdev will be created along with flavour and attributes.
Some network vdevs may be linked with a devlink port.

This is also aimed to replace "ip link vf" commands as they are strongly
linked to the PCI topology and allow access only to enabled VFs.
Even though current patchset and example is limited to MAC address
of the VF, this interface will allow to manage PF, VF, mdev in
SmartNic and non SmartNic modes, in unified way for networking and
non-networking devices via devlink instance.

Example:

A privileged user wants to configure a VF's hw_addr, before the VF is
enabled.

$ devlink vdev set pci/0000:03:00.0/1 hw_addr 10:22:33:44:55:66

$ devlink vdev show pci/0000:03:00.0/1
pci/0000:03:00.0/1: flavour pcivf pf 0 vf 0 port_index 1 hw_addr 10:22:33:44:55:66

$ devlink vdev show pci/0000:03:00.0/1 -jp
{
    "vdev": {
        "pci/0000:03:00.0/1": {
            "flavour": "pcivf",
            "pf": 0,
            "vf": 0,
            "port_index": 1,
            "hw_addr": "10:22:33:44:55:66"
        }
    }
}

Patches 1-5 adds devlink support for vdev.
Patches 6-7 adds netdevsim implementation and test.
Patch 9 adds mlx5 vdev creation and hw_addr get/set.

Yuval Avnery (9):
  devlink: Introduce vdev
  devlink: Add PCI attributes support for vdev
  devlink: Add port with vdev register support
  devlink: Support vdev HW address get
  devlink: Support vdev HW address set
  netdevsim: Add max_vfs to bus_dev
  netdevsim: Add devlink vdev creation
  netdevsim: Add devlink vdev sefltest for netdevsim
  net/mlx5e: Add support for devlink vdev and vdev hw_addr set/show

 .../net/ethernet/mellanox/mlx5/core/devlink.c |  86 ++++
 .../net/ethernet/mellanox/mlx5/core/devlink.h |   5 +
 .../net/ethernet/mellanox/mlx5/core/en_main.c |   6 +-
 .../net/ethernet/mellanox/mlx5/core/en_rep.c  |   9 +-
 .../net/ethernet/mellanox/mlx5/core/eswitch.c |  19 +-
 .../net/ethernet/mellanox/mlx5/core/eswitch.h |   7 +-
 .../mellanox/mlx5/core/eswitch_offloads.c     |   8 +
 drivers/net/netdevsim/Makefile                |   2 +-
 drivers/net/netdevsim/bus.c                   |  39 +-
 drivers/net/netdevsim/dev.c                   |   9 +-
 drivers/net/netdevsim/netdevsim.h             |  11 +
 drivers/net/netdevsim/vdev.c                  |  96 +++++
 include/net/devlink.h                         |  44 ++
 include/uapi/linux/devlink.h                  |  16 +
 net/core/devlink.c                            | 393 +++++++++++++++++-
 .../drivers/net/netdevsim/devlink.sh          |  55 ++-
 16 files changed, 777 insertions(+), 28 deletions(-)
 create mode 100644 drivers/net/netdevsim/vdev.c

-- 
2.17.1


^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2019-10-30  2:30 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-22 17:43 [PATCH net-next 0/9] devlink vdev Yuval Avnery
2019-10-22 17:43 ` [PATCH net-next 1/9] devlink: Introduce vdev Yuval Avnery
2019-10-22 17:43 ` [PATCH net-next 2/9] devlink: Add PCI attributes support for vdev Yuval Avnery
2019-10-22 17:43 ` [PATCH net-next 3/9] devlink: Add port with vdev register support Yuval Avnery
2019-10-22 17:43 ` [PATCH net-next 4/9] devlink: Support vdev HW address get Yuval Avnery
2019-10-22 17:43 ` [PATCH net-next 5/9] devlink: Support vdev HW address set Yuval Avnery
2019-10-22 17:43 ` [PATCH net-next 6/9] netdevsim: Add max_vfs to bus_dev Yuval Avnery
2019-10-22 17:43 ` [PATCH net-next 7/9] netdevsim: Add devlink vdev creation Yuval Avnery
2019-10-22 17:43 ` [PATCH net-next 8/9] netdevsim: Add devlink vdev sefltest for netdevsim Yuval Avnery
2019-10-22 17:43 ` [PATCH net-next 9/9] net/mlx5e: Add support for devlink vdev and vdev hw_addr set/show Yuval Avnery
2019-10-23 15:48 ` [PATCH net-next 0/9] devlink vdev Or Gerlitz
2019-10-23 19:00 ` Jakub Kicinski
2019-10-23 19:25   ` Jiri Pirko
2019-10-23 22:14     ` Jakub Kicinski
2019-10-24  0:11       ` Yuval Avnery
2019-10-24  2:51         ` Jakub Kicinski
2019-10-25 14:58           ` Andy Gospodarek
2019-10-28 19:04             ` Yuval Avnery
2019-10-28 20:02             ` Parav Pandit
2019-10-29 17:08             ` Jakub Kicinski
2019-10-29 17:56               ` Andy Gospodarek
2019-10-29 18:06               ` Yuval Avnery
2019-10-29 18:32                 ` Jakub Kicinski
2019-10-30  2:30               ` Parav Pandit

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).