netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 net-next 00/14] pds_core driver
@ 2023-02-17 22:55 Shannon Nelson
  2023-02-17 22:55 ` [PATCH v3 net-next 01/14] devlink: add enable_migration parameter Shannon Nelson
                   ` (15 more replies)
  0 siblings, 16 replies; 27+ messages in thread
From: Shannon Nelson @ 2023-02-17 22:55 UTC (permalink / raw)
  To: netdev, davem, kuba; +Cc: drivers, brett.creeley, Shannon Nelson

Summary:
--------
This patchset implements new driver for use with the AMD/Pensando
Distributed Services Card (DSC), intended to provide core configuration
services through the auxiliary_bus for VFio and vDPA feature specific
drivers.

To keep this patchset to a manageable size, the pds_vdpa and pds_vfio
drivers have been split out into their own patchsets to be reviewed
separately.


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 auxiliary_bus devices for each VF for communicating with the
drivers for the VF devices.  The VFs may be for VFio 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 in the core device, 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 that 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 a 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, or 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                       |
    |                                               |
    -------------------------------------------------


Changes:
  v3:
 - changed names from "pensando" to "amd" and updated copyright strings
 - dropped the DEVLINK_PARAM_GENERIC_ID_FW_BANK for future development
 - changed the auxiliary device creation to be triggered by the
   PCI bus event BOUND_DRIVER, and torn down at UNBIND_DRIVER in order
   to properly handle users using the sysfs bind/unbind functions
 - dropped some noisy log messages
 - rebased to current net-next

  RFC to v2:
https://lore.kernel.org/netdev/20221207004443.33779-1-shannon.nelson@amd.com/
 - added separate devlink param patches for DEVLINK_PARAM_GENERIC_ID_ENABLE_MIGRATION
   and DEVLINK_PARAM_GENERIC_ID_FW_BANK, and dropped the driver specific implementations
 - updated descriptions for the new devlink parameters
 - dropped netdev support
 - dropped vDPA patches, will followup later
 - separated fw update and fw bank select into their own patches

  RFC:
https://lore.kernel.org/netdev/20221118225656.48309-1-snelson@pensando.io/

Shannon Nelson (14):
  devlink: add enable_migration parameter
  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

 .../device_drivers/ethernet/amd/pds_core.rst  | 150 ++++
 .../device_drivers/ethernet/index.rst         |   1 +
 .../networking/devlink/devlink-params.rst     |   3 +
 drivers/net/ethernet/amd/Kconfig              |  12 +
 drivers/net/ethernet/amd/Makefile             |   1 +
 drivers/net/ethernet/amd/pds_core/Makefile    |  14 +
 drivers/net/ethernet/amd/pds_core/adminq.c    | 299 ++++++++
 drivers/net/ethernet/amd/pds_core/auxbus.c    | 303 +++++++++
 drivers/net/ethernet/amd/pds_core/core.c      | 599 ++++++++++++++++
 drivers/net/ethernet/amd/pds_core/core.h      | 318 +++++++++
 drivers/net/ethernet/amd/pds_core/debugfs.c   | 262 +++++++
 drivers/net/ethernet/amd/pds_core/dev.c       | 358 ++++++++++
 drivers/net/ethernet/amd/pds_core/devlink.c   | 199 ++++++
 drivers/net/ethernet/amd/pds_core/fw.c        | 192 ++++++
 drivers/net/ethernet/amd/pds_core/main.c      | 435 ++++++++++++
 include/linux/pds/pds_adminq.h                | 643 ++++++++++++++++++
 include/linux/pds/pds_auxbus.h                |  85 +++
 include/linux/pds/pds_common.h                |  93 +++
 include/linux/pds/pds_core_if.h               | 580 ++++++++++++++++
 include/linux/pds/pds_intr.h                  | 161 +++++
 include/net/devlink.h                         |   4 +
 net/devlink/leftover.c                        |   5 +
 22 files changed, 4717 insertions(+)
 create mode 100644 Documentation/networking/device_drivers/ethernet/amd/pds_core.rst
 create mode 100644 drivers/net/ethernet/amd/pds_core/Makefile
 create mode 100644 drivers/net/ethernet/amd/pds_core/adminq.c
 create mode 100644 drivers/net/ethernet/amd/pds_core/auxbus.c
 create mode 100644 drivers/net/ethernet/amd/pds_core/core.c
 create mode 100644 drivers/net/ethernet/amd/pds_core/core.h
 create mode 100644 drivers/net/ethernet/amd/pds_core/debugfs.c
 create mode 100644 drivers/net/ethernet/amd/pds_core/dev.c
 create mode 100644 drivers/net/ethernet/amd/pds_core/devlink.c
 create mode 100644 drivers/net/ethernet/amd/pds_core/fw.c
 create mode 100644 drivers/net/ethernet/amd/pds_core/main.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

-- 
2.17.1


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

end of thread, other threads:[~2023-02-25 22:57 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-17 22:55 [PATCH v3 net-next 00/14] pds_core driver Shannon Nelson
2023-02-17 22:55 ` [PATCH v3 net-next 01/14] devlink: add enable_migration parameter Shannon Nelson
2023-02-20  8:22   ` Jiri Pirko
2023-02-20 23:54     ` Shannon Nelson
2023-02-21 12:33       ` Jiri Pirko
2023-02-21 21:55         ` Shannon Nelson
2023-02-20  8:23   ` Jiri Pirko
2023-02-17 22:55 ` [PATCH v3 net-next 02/14] pds_core: initial framework for pds_core driver Shannon Nelson
2023-02-17 22:55 ` [PATCH v3 net-next 03/14] pds_core: add devcmd device interfaces Shannon Nelson
2023-02-17 22:55 ` [PATCH v3 net-next 04/14] pds_core: health timer and workqueue Shannon Nelson
2023-02-17 22:55 ` [PATCH v3 net-next 05/14] pds_core: set up device and adminq Shannon Nelson
2023-02-17 22:55 ` [PATCH v3 net-next 06/14] pds_core: Add adminq processing and commands Shannon Nelson
2023-02-17 22:55 ` [PATCH v3 net-next 07/14] pds_core: add FW update feature to devlink Shannon Nelson
2023-02-17 22:55 ` [PATCH v3 net-next 08/14] pds_core: set up the VIF definitions and defaults Shannon Nelson
2023-02-17 22:55 ` [PATCH v3 net-next 09/14] pds_core: initial VF configuration Shannon Nelson
2023-02-17 22:55 ` [PATCH v3 net-next 10/14] pds_core: add auxiliary_bus devices Shannon Nelson
2023-02-17 22:55 ` [PATCH v3 net-next 11/14] pds_core: devlink params for enabling VIF support Shannon Nelson
2023-02-17 22:55 ` [PATCH v3 net-next 12/14] pds_core: add the aux client API Shannon Nelson
2023-02-17 22:55 ` [PATCH v3 net-next 13/14] pds_core: publish events to the clients Shannon Nelson
2023-02-17 22:55 ` [PATCH v3 net-next 14/14] pds_core: Kconfig and pds_core.rst Shannon Nelson
2023-02-18  2:48   ` kernel test robot
2023-02-19 10:11 ` [PATCH v3 net-next 00/14] pds_core driver Leon Romanovsky
2023-02-20 23:53   ` Shannon Nelson
2023-02-21  6:53     ` Leon Romanovsky
2023-02-21 22:03       ` Shannon Nelson
2023-02-22  7:59         ` Leon Romanovsky
2023-02-25 22:57 ` 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).