Shannon Nelson
2023-May-03 18:12 UTC
[PATCH v5 virtio 11/11] pds_vdpa: pds_vdps.rst and Kconfig
Add the documentation and Kconfig entry for pds_vdpa driver. Signed-off-by: Shannon Nelson <shannon.nelson at amd.com> --- .../device_drivers/ethernet/amd/pds_vdpa.rst | 85 +++++++++++++++++++ .../device_drivers/ethernet/index.rst | 1 + MAINTAINERS | 4 + drivers/vdpa/Kconfig | 8 ++ 4 files changed, 98 insertions(+) create mode 100644 Documentation/networking/device_drivers/ethernet/amd/pds_vdpa.rst diff --git a/Documentation/networking/device_drivers/ethernet/amd/pds_vdpa.rst b/Documentation/networking/device_drivers/ethernet/amd/pds_vdpa.rst new file mode 100644 index 000000000000..587927d3de92 --- /dev/null +++ b/Documentation/networking/device_drivers/ethernet/amd/pds_vdpa.rst @@ -0,0 +1,85 @@ +.. SPDX-License-Identifier: GPL-2.0+ +.. note: can be edited and viewed with /usr/bin/formiko-vim + +=========================================================+PCI vDPA driver for the AMD/Pensando(R) DSC adapter family +=========================================================+ +AMD/Pensando vDPA VF Device Driver + +Copyright(c) 2023 Advanced Micro Devices, Inc + +Overview +=======+ +The ``pds_vdpa`` driver is an auxiliary bus driver that supplies +a vDPA device for use by the virtio network stack. It is used with +the Pensando Virtual Function devices that offer vDPA and virtio queue +services. It depends on the ``pds_core`` driver and hardware for the PF +and VF PCI handling as well as for device configuration services. + +Using the device +===============+ +The ``pds_vdpa`` device is enabled via multiple configuration steps and +depends on the ``pds_core`` driver to create and enable SR-IOV Virtual +Function devices. After the VFs are enabled, we enable the vDPA service +in the ``pds_core`` device to create the auxiliary devices used by pds_vdpa. + +Example steps: + +.. code-block:: bash + + #!/bin/bash + + modprobe pds_core + modprobe vdpa + modprobe pds_vdpa + + PF_BDF=`ls /sys/module/pds_core/drivers/pci\:pds_core/*/sriov_numvfs | awk -F / '{print $7}'` + + # Enable vDPA VF auxiliary device(s) in the PF + devlink dev param set pci/$PF_BDF name enable_vnet cmode runtime value true + + # Create a VF for vDPA use + echo 1 > /sys/bus/pci/drivers/pds_core/$PF_BDF/sriov_numvfs + + # Find the vDPA services/devices available + PDS_VDPA_MGMT=`vdpa mgmtdev show | grep vDPA | head -1 | cut -d: -f1` + + # Create a vDPA device for use in virtio network configurations + vdpa dev add name vdpa1 mgmtdev $PDS_VDPA_MGMT mac 00:11:22:33:44:55 + + # Set up an ethernet interface on the vdpa device + modprobe virtio_vdpa + + + +Enabling the driver +==================+ +The driver is enabled via the standard kernel configuration system, +using the make command:: + + make oldconfig/menuconfig/etc. + +The driver is located in the menu structure at: + + -> Device Drivers + -> Network device support (NETDEVICES [=y]) + -> Ethernet driver support + -> Pensando devices + -> Pensando Ethernet PDS_VDPA Support + +Support +======+ +For general Linux networking support, please use the netdev mailing +list, which is monitored by Pensando personnel:: + + netdev at vger.kernel.org + +For more specific support needs, please use the Pensando driver support +email:: + + drivers at pensando.io diff --git a/Documentation/networking/device_drivers/ethernet/index.rst b/Documentation/networking/device_drivers/ethernet/index.rst index 417ca514a4d0..94ecb67c0885 100644 --- a/Documentation/networking/device_drivers/ethernet/index.rst +++ b/Documentation/networking/device_drivers/ethernet/index.rst @@ -15,6 +15,7 @@ Contents: amazon/ena altera/altera_tse amd/pds_core + amd/pds_vdpa aquantia/atlantic chelsio/cxgb cirrus/cs89x0 diff --git a/MAINTAINERS b/MAINTAINERS index ebd26b3ca90e..c565b71ce56f 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -22200,6 +22200,10 @@ SNET DPU VIRTIO DATA PATH ACCELERATOR R: Alvaro Karsz <alvaro.karsz at solid-run.com> F: drivers/vdpa/solidrun/ +PDS DSC VIRTIO DATA PATH ACCELERATOR +R: Shannon Nelson <shannon.nelson at amd.com> +F: drivers/vdpa/pds/ + VIRTIO BALLOON M: "Michael S. Tsirkin" <mst at redhat.com> M: David Hildenbrand <david at redhat.com> diff --git a/drivers/vdpa/Kconfig b/drivers/vdpa/Kconfig index cd6ad92f3f05..2ee1b288691d 100644 --- a/drivers/vdpa/Kconfig +++ b/drivers/vdpa/Kconfig @@ -116,4 +116,12 @@ config ALIBABA_ENI_VDPA This driver includes a HW monitor device that reads health values from the DPU. +config PDS_VDPA + tristate "vDPA driver for AMD/Pensando DSC devices" + depends on PDS_CORE + help + vDPA network driver for AMD/Pensando's PDS Core devices. + With this driver, the VirtIO dataplane can be + offloaded to an AMD/Pensando DSC device. + endif # VDPA -- 2.17.1
Jason Wang
2023-May-15 05:07 UTC
[PATCH v5 virtio 11/11] pds_vdpa: pds_vdps.rst and Kconfig
On Thu, May 4, 2023 at 2:13?AM Shannon Nelson <shannon.nelson at amd.com> wrote:> > Add the documentation and Kconfig entry for pds_vdpa driver. > > Signed-off-by: Shannon Nelson <shannon.nelson at amd.com> > --- > .../device_drivers/ethernet/amd/pds_vdpa.rst | 85 +++++++++++++++++++ > .../device_drivers/ethernet/index.rst | 1 + > MAINTAINERS | 4 + > drivers/vdpa/Kconfig | 8 ++ > 4 files changed, 98 insertions(+) > create mode 100644 Documentation/networking/device_drivers/ethernet/amd/pds_vdpa.rst > > diff --git a/Documentation/networking/device_drivers/ethernet/amd/pds_vdpa.rst b/Documentation/networking/device_drivers/ethernet/amd/pds_vdpa.rst > new file mode 100644 > index 000000000000..587927d3de92 > --- /dev/null > +++ b/Documentation/networking/device_drivers/ethernet/amd/pds_vdpa.rst > @@ -0,0 +1,85 @@ > +.. SPDX-License-Identifier: GPL-2.0+ > +.. note: can be edited and viewed with /usr/bin/formiko-vim > + > +=========================================================> +PCI vDPA driver for the AMD/Pensando(R) DSC adapter family > +=========================================================> + > +AMD/Pensando vDPA VF Device Driver > + > +Copyright(c) 2023 Advanced Micro Devices, Inc > + > +Overview > +=======> + > +The ``pds_vdpa`` driver is an auxiliary bus driver that supplies > +a vDPA device for use by the virtio network stack. It is used with > +the Pensando Virtual Function devices that offer vDPA and virtio queue > +services. It depends on the ``pds_core`` driver and hardware for the PF > +and VF PCI handling as well as for device configuration services. > + > +Using the device > +===============> + > +The ``pds_vdpa`` device is enabled via multiple configuration steps and > +depends on the ``pds_core`` driver to create and enable SR-IOV Virtual > +Function devices. After the VFs are enabled, we enable the vDPA service > +in the ``pds_core`` device to create the auxiliary devices used by pds_vdpa. > + > +Example steps: > + > +.. code-block:: bash > + > + #!/bin/bash > + > + modprobe pds_core > + modprobe vdpa > + modprobe pds_vdpa > + > + PF_BDF=`ls /sys/module/pds_core/drivers/pci\:pds_core/*/sriov_numvfs | awk -F / '{print $7}'` > + > + # Enable vDPA VF auxiliary device(s) in the PF > + devlink dev param set pci/$PF_BDF name enable_vnet cmode runtime value true > + > + # Create a VF for vDPA use > + echo 1 > /sys/bus/pci/drivers/pds_core/$PF_BDF/sriov_numvfs > + > + # Find the vDPA services/devices available > + PDS_VDPA_MGMT=`vdpa mgmtdev show | grep vDPA | head -1 | cut -d: -f1` > + > + # Create a vDPA device for use in virtio network configurations > + vdpa dev add name vdpa1 mgmtdev $PDS_VDPA_MGMT mac 00:11:22:33:44:55 > + > + # Set up an ethernet interface on the vdpa device > + modprobe virtio_vdpa > + > + > + > +Enabling the driver > +==================> + > +The driver is enabled via the standard kernel configuration system, > +using the make command:: > + > + make oldconfig/menuconfig/etc. > + > +The driver is located in the menu structure at: > + > + -> Device Drivers > + -> Network device support (NETDEVICES [=y]) > + -> Ethernet driver support > + -> Pensando devices > + -> Pensando Ethernet PDS_VDPA Support > + > +Support > +======> + > +For general Linux networking support, please use the netdev mailing > +list, which is monitored by Pensando personnel:: > + > + netdev at vger.kernel.org > + > +For more specific support needs, please use the Pensando driver support > +email:: > + > + drivers at pensando.io > diff --git a/Documentation/networking/device_drivers/ethernet/index.rst b/Documentation/networking/device_drivers/ethernet/index.rst > index 417ca514a4d0..94ecb67c0885 100644 > --- a/Documentation/networking/device_drivers/ethernet/index.rst > +++ b/Documentation/networking/device_drivers/ethernet/index.rst > @@ -15,6 +15,7 @@ Contents: > amazon/ena > altera/altera_tse > amd/pds_core > + amd/pds_vdpa > aquantia/atlantic > chelsio/cxgb > cirrus/cs89x0 > diff --git a/MAINTAINERS b/MAINTAINERS > index ebd26b3ca90e..c565b71ce56f 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -22200,6 +22200,10 @@ SNET DPU VIRTIO DATA PATH ACCELERATOR > R: Alvaro Karsz <alvaro.karsz at solid-run.com> > F: drivers/vdpa/solidrun/ > > +PDS DSC VIRTIO DATA PATH ACCELERATOR > +R: Shannon Nelson <shannon.nelson at amd.com> > +F: drivers/vdpa/pds/ > + > VIRTIO BALLOON > M: "Michael S. Tsirkin" <mst at redhat.com> > M: David Hildenbrand <david at redhat.com> > diff --git a/drivers/vdpa/Kconfig b/drivers/vdpa/Kconfig > index cd6ad92f3f05..2ee1b288691d 100644 > --- a/drivers/vdpa/Kconfig > +++ b/drivers/vdpa/Kconfig > @@ -116,4 +116,12 @@ config ALIBABA_ENI_VDPA > This driver includes a HW monitor device that > reads health values from the DPU. > > +config PDS_VDPA > + tristate "vDPA driver for AMD/Pensando DSC devices" > + depends on PDS_CORENeed to select VIRTIO_PCI_LIB? Thanks> + help > + vDPA network driver for AMD/Pensando's PDS Core devices. > + With this driver, the VirtIO dataplane can be > + offloaded to an AMD/Pensando DSC device. > + > endif # VDPA > -- > 2.17.1 >