1*9a8864d2SShannon Nelson.. SPDX-License-Identifier: GPL-2.0+ 2*9a8864d2SShannon Nelson.. note: can be edited and viewed with /usr/bin/formiko-vim 3*9a8864d2SShannon Nelson 4*9a8864d2SShannon Nelson========================================================== 5*9a8864d2SShannon NelsonPCI vDPA driver for the AMD/Pensando(R) DSC adapter family 6*9a8864d2SShannon Nelson========================================================== 7*9a8864d2SShannon Nelson 8*9a8864d2SShannon NelsonAMD/Pensando vDPA VF Device Driver 9*9a8864d2SShannon Nelson 10*9a8864d2SShannon NelsonCopyright(c) 2023 Advanced Micro Devices, Inc 11*9a8864d2SShannon Nelson 12*9a8864d2SShannon NelsonOverview 13*9a8864d2SShannon Nelson======== 14*9a8864d2SShannon Nelson 15*9a8864d2SShannon NelsonThe ``pds_vdpa`` driver is an auxiliary bus driver that supplies 16*9a8864d2SShannon Nelsona vDPA device for use by the virtio network stack. It is used with 17*9a8864d2SShannon Nelsonthe Pensando Virtual Function devices that offer vDPA and virtio queue 18*9a8864d2SShannon Nelsonservices. It depends on the ``pds_core`` driver and hardware for the PF 19*9a8864d2SShannon Nelsonand VF PCI handling as well as for device configuration services. 20*9a8864d2SShannon Nelson 21*9a8864d2SShannon NelsonUsing the device 22*9a8864d2SShannon Nelson================ 23*9a8864d2SShannon Nelson 24*9a8864d2SShannon NelsonThe ``pds_vdpa`` device is enabled via multiple configuration steps and 25*9a8864d2SShannon Nelsondepends on the ``pds_core`` driver to create and enable SR-IOV Virtual 26*9a8864d2SShannon NelsonFunction devices. After the VFs are enabled, we enable the vDPA service 27*9a8864d2SShannon Nelsonin the ``pds_core`` device to create the auxiliary devices used by pds_vdpa. 28*9a8864d2SShannon Nelson 29*9a8864d2SShannon NelsonExample steps: 30*9a8864d2SShannon Nelson 31*9a8864d2SShannon Nelson.. code-block:: bash 32*9a8864d2SShannon Nelson 33*9a8864d2SShannon Nelson #!/bin/bash 34*9a8864d2SShannon Nelson 35*9a8864d2SShannon Nelson modprobe pds_core 36*9a8864d2SShannon Nelson modprobe vdpa 37*9a8864d2SShannon Nelson modprobe pds_vdpa 38*9a8864d2SShannon Nelson 39*9a8864d2SShannon Nelson PF_BDF=`ls /sys/module/pds_core/drivers/pci\:pds_core/*/sriov_numvfs | awk -F / '{print $7}'` 40*9a8864d2SShannon Nelson 41*9a8864d2SShannon Nelson # Enable vDPA VF auxiliary device(s) in the PF 42*9a8864d2SShannon Nelson devlink dev param set pci/$PF_BDF name enable_vnet cmode runtime value true 43*9a8864d2SShannon Nelson 44*9a8864d2SShannon Nelson # Create a VF for vDPA use 45*9a8864d2SShannon Nelson echo 1 > /sys/bus/pci/drivers/pds_core/$PF_BDF/sriov_numvfs 46*9a8864d2SShannon Nelson 47*9a8864d2SShannon Nelson # Find the vDPA services/devices available 48*9a8864d2SShannon Nelson PDS_VDPA_MGMT=`vdpa mgmtdev show | grep vDPA | head -1 | cut -d: -f1` 49*9a8864d2SShannon Nelson 50*9a8864d2SShannon Nelson # Create a vDPA device for use in virtio network configurations 51*9a8864d2SShannon Nelson vdpa dev add name vdpa1 mgmtdev $PDS_VDPA_MGMT mac 00:11:22:33:44:55 52*9a8864d2SShannon Nelson 53*9a8864d2SShannon Nelson # Set up an ethernet interface on the vdpa device 54*9a8864d2SShannon Nelson modprobe virtio_vdpa 55*9a8864d2SShannon Nelson 56*9a8864d2SShannon Nelson 57*9a8864d2SShannon Nelson 58*9a8864d2SShannon NelsonEnabling the driver 59*9a8864d2SShannon Nelson=================== 60*9a8864d2SShannon Nelson 61*9a8864d2SShannon NelsonThe driver is enabled via the standard kernel configuration system, 62*9a8864d2SShannon Nelsonusing the make command:: 63*9a8864d2SShannon Nelson 64*9a8864d2SShannon Nelson make oldconfig/menuconfig/etc. 65*9a8864d2SShannon Nelson 66*9a8864d2SShannon NelsonThe driver is located in the menu structure at: 67*9a8864d2SShannon Nelson 68*9a8864d2SShannon Nelson -> Device Drivers 69*9a8864d2SShannon Nelson -> Network device support (NETDEVICES [=y]) 70*9a8864d2SShannon Nelson -> Ethernet driver support 71*9a8864d2SShannon Nelson -> Pensando devices 72*9a8864d2SShannon Nelson -> Pensando Ethernet PDS_VDPA Support 73*9a8864d2SShannon Nelson 74*9a8864d2SShannon NelsonSupport 75*9a8864d2SShannon Nelson======= 76*9a8864d2SShannon Nelson 77*9a8864d2SShannon NelsonFor general Linux networking support, please use the netdev mailing 78*9a8864d2SShannon Nelsonlist, which is monitored by Pensando personnel:: 79*9a8864d2SShannon Nelson 80*9a8864d2SShannon Nelson netdev@vger.kernel.org 81*9a8864d2SShannon Nelson 82*9a8864d2SShannon NelsonFor more specific support needs, please use the Pensando driver support 83*9a8864d2SShannon Nelsonemail:: 84*9a8864d2SShannon Nelson 85*9a8864d2SShannon Nelson drivers@pensando.io 86