netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH net-next 00/19] pds core and vdpa drivers
@ 2022-11-18 22:56 Shannon Nelson
  2022-11-18 22:56 ` [RFC PATCH net-next 01/19] pds_core: initial framework for pds_core driver Shannon Nelson
                   ` (18 more replies)
  0 siblings, 19 replies; 61+ messages in thread
From: Shannon Nelson @ 2022-11-18 22:56 UTC (permalink / raw)
  To: netdev, davem, kuba, mst, jasowang, virtualization
  Cc: drivers, Shannon Nelson

Summary:
--------
This is a first draft patchset of a pair of new drivers for use with
the AMD/Pensando Distributed Services Card (DSC), intended to work along
side the existing ionic Ethernet driver to provide support of devices
for better virtualization support.  These drivers work together using
the auxiliary_bus for client drivers (pds_vdpa) to use the core
configuration services (pds_core).

This large patchset is both drivers combined in order to give a full
RFC view and can be split into separate pds_core and pds_vdpa patchsets
in the future.


Detail:
-------
AMD/Pensando is making available a new set of devices for supporting vDPA,
VFio, and potentially other features in the Distributed Services Card
(DSC).  These features are implemented through a PF that serves as a Core
device for controlling and configuring its VF devices.  These VF devices
have separate drivers that use the auxiliary_bus to work through the Core
device as the control path.

Currently, the DSC supports standard ethernet operations using the
ionic driver.  This is not replaced by the Core-based devices - these
new devices are in addition to the existing Ethernet device.  Typical DSC
configurations will include both PDS devices and Ionic Eth devices.

The Core device is a new PCI PF device managed by a new driver 'pds_core'.
It sets up a small representer netdev for managing the associated VFs,
and sets up auxiliary_bus devices for each VF for communicating with
the drivers for the VF devices.  The VFs may be for VFio/NVMe or vDPA,
and other services in the future; these VF types are selected as part
of the DSC internal FW configurations, which is out of the scope of
this patchset.  The Core device sets up devlink parameters for enabling
available feature sets.

Once a feature set is enabled, auxiliary_bus devices are created for each
VF that supports the feature.  These auxiliary_bus devices are named by
their feature plus VF PCI bdf so the auxiliary device driver can find
its related VF PCI driver instance.  The VF's driver then connects to
and uses this auxiliary_device to do control path configuration of the
feature through the PF device.

A cheap ASCII diagram of vDPA instance looks something like this and can
then be used with the vdpa kernel module to provide devices for virtio_vdpa
kernel module for host interfaces, vhost_vdpa kernel module for interfaces
exported into your favorite VM.


                                  ,----------.
                                  |   vdpa   |
                                  '----------'
                                       |
                                     vdpa_dev
                                    ctl   data
                                     |     ||
           pds_core.vDPA.2305 <---+  |     ||
                   |              |  |     ||
       netdev      |              |  |     ||
          |        |              |  |     ||
         .------------.         .------------.
         |  pds_core  |         |  pds_vdpa  |
         '------------'         '------------'
               ||                     ||
	     09:00.0                09:00.1
== PCI =========================================================
               ||                     ||
          .----------.           .----------.
    ,-----|    PF    |-----------|    VF    |-------,
    |     '----------'           -----------'       |
    |                     DSC                       |
    |                                               |
    -------------------------------------------------


The pds_core driver is targeted to reside in
drivers/net/ethernet/pensando/pds_core and the pds_vdpa driver lands
in drivers/vdpa/pds.  There are some shared include files placed in
include/linux/pds, which seemed reasonable at the time, but I've recently
seen suggestions of putting files like this under include/net instead,
so that may be up for some discussion.

I appreciate any and all time folks can spend reviewing and commenting.

Thanks,
sln

Shannon Nelson (19):
  pds_core: initial framework for pds_core driver
  pds_core: add devcmd device interfaces
  pds_core: health timer and workqueue
  pds_core: set up device and adminq
  pds_core: Add adminq processing and commands
  pds_core: add FW update feature to devlink
  pds_core: set up the VIF definitions and defaults
  pds_core: initial VF configuration
  pds_core: add auxiliary_bus devices
  pds_core: devlink params for enabling VIF support
  pds_core: add the aux client API
  pds_core: publish events to the clients
  pds_core: Kconfig and pds_core.rst
  pds_vdpa: Add new PCI VF device for PDS vDPA services
  pds_vdpa: virtio bar setup for vdpa
  pds_vdpa: add auxiliary driver
  pds_vdpa: add vdpa config client commands
  pds_vdpa: add support for vdpa and vdpamgmt interfaces
  pds_vdpa: add Kconfig entry and pds_vdpa.rst

 .../ethernet/pensando/pds_core.rst            | 162 ++++
 .../ethernet/pensando/pds_vdpa.rst            |  85 ++
 MAINTAINERS                                   |   4 +-
 drivers/net/ethernet/pensando/Kconfig         |  12 +
 .../net/ethernet/pensando/pds_core/Makefile   |  15 +
 .../net/ethernet/pensando/pds_core/adminq.c   | 299 +++++++
 .../net/ethernet/pensando/pds_core/auxbus.c   | 306 +++++++
 drivers/net/ethernet/pensando/pds_core/core.c | 616 ++++++++++++++
 drivers/net/ethernet/pensando/pds_core/core.h | 342 ++++++++
 .../net/ethernet/pensando/pds_core/debugfs.c  | 262 ++++++
 drivers/net/ethernet/pensando/pds_core/dev.c  | 403 +++++++++
 .../net/ethernet/pensando/pds_core/devlink.c  | 310 +++++++
 drivers/net/ethernet/pensando/pds_core/fw.c   | 192 +++++
 drivers/net/ethernet/pensando/pds_core/main.c | 440 ++++++++++
 .../net/ethernet/pensando/pds_core/netdev.c   | 504 +++++++++++
 drivers/vdpa/Kconfig                          |   7 +
 drivers/vdpa/pds/Makefile                     |  11 +
 drivers/vdpa/pds/aux_drv.c                    | 156 ++++
 drivers/vdpa/pds/aux_drv.h                    |  28 +
 drivers/vdpa/pds/cmds.c                       | 266 ++++++
 drivers/vdpa/pds/cmds.h                       |  17 +
 drivers/vdpa/pds/debugfs.c                    | 234 +++++
 drivers/vdpa/pds/debugfs.h                    |  28 +
 drivers/vdpa/pds/pci_drv.c                    | 172 ++++
 drivers/vdpa/pds/pci_drv.h                    |  49 ++
 drivers/vdpa/pds/vdpa_dev.c                   | 796 ++++++++++++++++++
 drivers/vdpa/pds/vdpa_dev.h                   |  60 ++
 drivers/vdpa/pds/virtio_pci.c                 | 283 +++++++
 include/linux/pds/pds_adminq.h                | 643 ++++++++++++++
 include/linux/pds/pds_auxbus.h                |  88 ++
 include/linux/pds/pds_common.h                |  99 +++
 include/linux/pds/pds_core_if.h               | 582 +++++++++++++
 include/linux/pds/pds_intr.h                  | 160 ++++
 include/linux/pds/pds_vdpa.h                  | 219 +++++
 34 files changed, 7849 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/networking/device_drivers/ethernet/pensando/pds_core.rst
 create mode 100644 Documentation/networking/device_drivers/ethernet/pensando/pds_vdpa.rst
 create mode 100644 drivers/net/ethernet/pensando/pds_core/Makefile
 create mode 100644 drivers/net/ethernet/pensando/pds_core/adminq.c
 create mode 100644 drivers/net/ethernet/pensando/pds_core/auxbus.c
 create mode 100644 drivers/net/ethernet/pensando/pds_core/core.c
 create mode 100644 drivers/net/ethernet/pensando/pds_core/core.h
 create mode 100644 drivers/net/ethernet/pensando/pds_core/debugfs.c
 create mode 100644 drivers/net/ethernet/pensando/pds_core/dev.c
 create mode 100644 drivers/net/ethernet/pensando/pds_core/devlink.c
 create mode 100644 drivers/net/ethernet/pensando/pds_core/fw.c
 create mode 100644 drivers/net/ethernet/pensando/pds_core/main.c
 create mode 100644 drivers/net/ethernet/pensando/pds_core/netdev.c
 create mode 100644 drivers/vdpa/pds/Makefile
 create mode 100644 drivers/vdpa/pds/aux_drv.c
 create mode 100644 drivers/vdpa/pds/aux_drv.h
 create mode 100644 drivers/vdpa/pds/cmds.c
 create mode 100644 drivers/vdpa/pds/cmds.h
 create mode 100644 drivers/vdpa/pds/debugfs.c
 create mode 100644 drivers/vdpa/pds/debugfs.h
 create mode 100644 drivers/vdpa/pds/pci_drv.c
 create mode 100644 drivers/vdpa/pds/pci_drv.h
 create mode 100644 drivers/vdpa/pds/vdpa_dev.c
 create mode 100644 drivers/vdpa/pds/vdpa_dev.h
 create mode 100644 drivers/vdpa/pds/virtio_pci.c
 create mode 100644 include/linux/pds/pds_adminq.h
 create mode 100644 include/linux/pds/pds_auxbus.h
 create mode 100644 include/linux/pds/pds_common.h
 create mode 100644 include/linux/pds/pds_core_if.h
 create mode 100644 include/linux/pds/pds_intr.h
 create mode 100644 include/linux/pds/pds_vdpa.h

-- 
2.17.1


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

end of thread, other threads:[~2022-12-05  7:42 UTC | newest]

Thread overview: 61+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-18 22:56 [RFC PATCH net-next 00/19] pds core and vdpa drivers Shannon Nelson
2022-11-18 22:56 ` [RFC PATCH net-next 01/19] pds_core: initial framework for pds_core driver Shannon Nelson
2022-11-18 22:56 ` [RFC PATCH net-next 02/19] pds_core: add devcmd device interfaces Shannon Nelson
2022-11-18 22:56 ` [RFC PATCH net-next 03/19] pds_core: health timer and workqueue Shannon Nelson
2022-11-18 22:56 ` [RFC PATCH net-next 04/19] pds_core: set up device and adminq Shannon Nelson
2022-11-18 22:56 ` [RFC PATCH net-next 05/19] pds_core: Add adminq processing and commands Shannon Nelson
2022-11-18 22:56 ` [RFC PATCH net-next 06/19] pds_core: add FW update feature to devlink Shannon Nelson
2022-11-28 18:27   ` Jakub Kicinski
2022-11-28 22:25     ` Shannon Nelson
2022-11-28 23:33       ` Jakub Kicinski
2022-11-28 23:45         ` Shannon Nelson
2022-11-29  0:18           ` Keller, Jacob E
2022-11-29  0:13         ` Keller, Jacob E
2022-11-18 22:56 ` [RFC PATCH net-next 07/19] pds_core: set up the VIF definitions and defaults Shannon Nelson
2022-11-18 22:56 ` [RFC PATCH net-next 08/19] pds_core: initial VF configuration Shannon Nelson
2022-11-28 18:28   ` Jakub Kicinski
2022-11-28 22:25     ` Shannon Nelson
2022-11-28 23:37       ` Jakub Kicinski
2022-11-29  0:37         ` Shannon Nelson
2022-11-29  0:55           ` Jakub Kicinski
2022-11-29  1:08             ` Shannon Nelson
2022-11-29  1:54               ` Jakub Kicinski
2022-11-29 17:57                 ` Shannon Nelson
2022-11-30  2:02                   ` Jakub Kicinski
2022-12-01  0:12                     ` Shannon Nelson
2022-12-01  3:45                       ` Jakub Kicinski
2022-12-01 19:19                         ` Shannon Nelson
2022-12-01 22:29                           ` Jakub Kicinski
2022-11-18 22:56 ` [RFC PATCH net-next 09/19] pds_core: add auxiliary_bus devices Shannon Nelson
2022-11-18 22:56 ` [RFC PATCH net-next 10/19] pds_core: devlink params for enabling VIF support Shannon Nelson
2022-11-28 18:29   ` Jakub Kicinski
2022-11-28 22:26     ` Shannon Nelson
2022-11-28 22:57       ` Andrew Lunn
2022-11-28 23:07         ` Shannon Nelson
2022-11-28 23:29           ` Andrew Lunn
2022-11-28 23:39             ` Jakub Kicinski
2022-11-29  9:00               ` Leon Romanovsky
2022-11-29  9:13               ` Jiri Pirko
2022-11-29 17:16                 ` Shannon Nelson
2022-11-18 22:56 ` [RFC PATCH net-next 11/19] pds_core: add the aux client API Shannon Nelson
2022-11-18 22:56 ` [RFC PATCH net-next 12/19] pds_core: publish events to the clients Shannon Nelson
2022-11-18 22:56 ` [RFC PATCH net-next 13/19] pds_core: Kconfig and pds_core.rst Shannon Nelson
2022-11-18 22:56 ` [RFC PATCH net-next 14/19] pds_vdpa: Add new PCI VF device for PDS vDPA services Shannon Nelson
2022-11-22  3:53   ` Jason Wang
2022-11-29 22:24     ` Shannon Nelson
2022-11-18 22:56 ` [RFC PATCH net-next 15/19] pds_vdpa: virtio bar setup for vdpa Shannon Nelson
2022-11-22  3:32   ` Jason Wang
2022-11-22  6:36     ` Jason Wang
2022-11-29 23:02       ` Shannon Nelson
2022-11-18 22:56 ` [RFC PATCH net-next 16/19] pds_vdpa: add auxiliary driver Shannon Nelson
2022-11-18 22:56 ` [RFC PATCH net-next 17/19] pds_vdpa: add vdpa config client commands Shannon Nelson
2022-11-22  6:32   ` Jason Wang
2022-11-29 23:16     ` Shannon Nelson
2022-11-18 22:56 ` [RFC PATCH net-next 18/19] pds_vdpa: add support for vdpa and vdpamgmt interfaces Shannon Nelson
2022-11-22  6:32   ` Jason Wang
2022-11-30  0:11     ` Shannon Nelson
2022-12-05  7:40       ` Jason Wang
2022-11-18 22:56 ` [RFC PATCH net-next 19/19] pds_vdpa: add Kconfig entry and pds_vdpa.rst Shannon Nelson
2022-11-22  6:35   ` Jason Wang
2022-11-22 22:33     ` Shannon Nelson
2022-11-30  0:13     ` Shannon Nelson

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