Skip to content

Commit 9a8864d

Browse files
emuslnmstsirkin
authored andcommitted
pds_vdpa: pds_vdps.rst and Kconfig
Add the documentation and Kconfig entry for pds_vdpa driver. Signed-off-by: Shannon Nelson <shannon.nelson@amd.com> Acked-by: Jason Wang <jasowang@redhat.com> Message-Id: <20230519215632.12343-12-shannon.nelson@amd.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
1 parent 67f27b8 commit 9a8864d

4 files changed

Lines changed: 100 additions & 0 deletions

File tree

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

Documentation/networking/device_drivers/ethernet/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ Contents:
1515
amazon/ena
1616
altera/altera_tse
1717
amd/pds_core
18+
amd/pds_vdpa
1819
aquantia/atlantic
1920
chelsio/cxgb
2021
cirrus/cs89x0

MAINTAINERS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22325,6 +22325,10 @@ F: include/linux/vringh.h
2232522325
F: include/uapi/linux/virtio_*.h
2232622326
F: tools/virtio/
2232722327

22328+
PDS DSC VIRTIO DATA PATH ACCELERATOR
22329+
R: Shannon Nelson <shannon.nelson@amd.com>
22330+
F: drivers/vdpa/pds/
22331+
2232822332
VIRTIO CRYPTO DRIVER
2232922333
M: Gonglei <arei.gonglei@huawei.com>
2233022334
L: virtualization@lists.linux-foundation.org

drivers/vdpa/Kconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,4 +116,14 @@ config ALIBABA_ENI_VDPA
116116
This driver includes a HW monitor device that
117117
reads health values from the DPU.
118118

119+
config PDS_VDPA
120+
tristate "vDPA driver for AMD/Pensando DSC devices"
121+
select VIRTIO_PCI_LIB
122+
depends on PCI_MSI
123+
depends on PDS_CORE
124+
help
125+
vDPA network driver for AMD/Pensando's PDS Core devices.
126+
With this driver, the VirtIO dataplane can be
127+
offloaded to an AMD/Pensando DSC device.
128+
119129
endif # VDPA

0 commit comments

Comments
 (0)