Skip to content

Commit

Permalink
pds_vdpa: pds_vdps.rst and Kconfig
Browse files Browse the repository at this point in the history
Add the documentation and Kconfig entry for pds_vdpa driver.

Signed-off-by: Shannon Nelson <shannon.nelson@amd.com>
  • Loading branch information
emusln authored and intel-lab-lkp committed Mar 9, 2023
1 parent 22c2da3 commit 62e66fe
Show file tree
Hide file tree
Showing 3 changed files with 96 additions and 0 deletions.
@@ -0,0 +1,84 @@
.. 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.

Shown below are the steps to bind the driver to a VF and also to the
associated auxiliary device created by the ``pds_core`` driver.

.. code-block:: bash
#!/bin/bash
modprobe pds_core
modprobe vdpa
modprobe pds_vdpa
PF_BDF=`grep -H "vDPA.*1" /sys/kernel/debug/pds_core/*/viftypes | head -1 | awk -F / '{print $6}'`
# Enable vDPA VF auxiliary device(s) in the PF
devlink dev param set pci/$PF_BDF name enable_vnet value true cmode runtime
# 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@vger.kernel.org

For more specific support needs, please use the Pensando driver support
email::

drivers@pensando.io
4 changes: 4 additions & 0 deletions MAINTAINERS
Expand Up @@ -22106,6 +22106,10 @@ SNET DPU VIRTIO DATA PATH ACCELERATOR
R: Alvaro Karsz <alvaro.karsz@solid-run.com>
F: drivers/vdpa/solidrun/

PDS DSC VIRTIO DATA PATH ACCELERATOR
R: Shannon Nelson <shannon.nelson@amd.com>
F: drivers/vdpa/pds/

VIRTIO BALLOON
M: "Michael S. Tsirkin" <mst@redhat.com>
M: David Hildenbrand <david@redhat.com>
Expand Down
8 changes: 8 additions & 0 deletions drivers/vdpa/Kconfig
Expand Up @@ -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

0 comments on commit 62e66fe

Please sign in to comment.