On Sat, Nov 19, 2022 at 6:57 AM Shannon Nelson <snelson@xxxxxxxxxxx> wrote: > > Signed-off-by: Shannon Nelson <snelson@xxxxxxxxxxx> > --- > .../ethernet/pensando/pds_vdpa.rst | 85 +++++++++++++++++++ > MAINTAINERS | 1 + > drivers/vdpa/Kconfig | 7 ++ > 3 files changed, 93 insertions(+) > create mode 100644 Documentation/networking/device_drivers/ethernet/pensando/pds_vdpa.rst > > diff --git a/Documentation/networking/device_drivers/ethernet/pensando/pds_vdpa.rst b/Documentation/networking/device_drivers/ethernet/pensando/pds_vdpa.rst > new file mode 100644 > index 000000000000..c517f337d212 > --- /dev/null > +++ b/Documentation/networking/device_drivers/ethernet/pensando/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 Pensando(R) DSC adapter family > +========================================================== > + > +Pensando vDPA VF Device Driver > +Copyright(c) 2022 Pensando Systems, Inc > + > +Overview > +======== > + > +The ``pds_vdpa`` driver is a PCI and auxiliary bus driver and 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 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. This > +example assumes the pds_core and pds_vdpa modules are already > +loaded. > + > +.. code-block:: bash > + > + #!/bin/bash > + > + modprobe pds_core > + modprobe pds_vdpa > + > + PF_BDF=`grep "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@xxxxxxxxxxxxxxx > + > +For more specific support needs, please use the Pensando driver support > +email:: > + > + drivers@xxxxxxxxxxx > diff --git a/MAINTAINERS b/MAINTAINERS > index a4f989fa8192..a4d96e854757 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -16152,6 +16152,7 @@ L: netdev@xxxxxxxxxxxxxxx > S: Supported > F: Documentation/networking/device_drivers/ethernet/pensando/ > F: drivers/net/ethernet/pensando/ > +F: drivers/vdpa/pds/ > F: include/linux/pds/ > > PER-CPU MEMORY ALLOCATOR > diff --git a/drivers/vdpa/Kconfig b/drivers/vdpa/Kconfig > index 50f45d037611..1c44df18f3da 100644 > --- a/drivers/vdpa/Kconfig > +++ b/drivers/vdpa/Kconfig > @@ -86,4 +86,11 @@ config ALIBABA_ENI_VDPA > VDPA driver for Alibaba ENI (Elastic Network Interface) which is built upon > virtio 0.9.5 specification. > > +config PDS_VDPA > + tristate "vDPA driver for Pensando DSC devices" > + select VHOST_RING Any reason it needs to select on vringh? Thanks > + depends on PDS_CORE > + help > + VDPA network driver for Pensando's PDS Core devices. > + > endif # VDPA > -- > 2.17.1 > _______________________________________________ Virtualization mailing list Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linuxfoundation.org/mailman/listinfo/virtualization