Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CFD832564 for ; Tue, 16 May 2023 02:56:27 +0000 (UTC) Received: from NAM02-BN1-obe.outbound.protection.outlook.com (mail-bn1nam02on2078.outbound.protection.outlook.com [40.107.212.78]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 62D273C1F for ; Mon, 15 May 2023 19:56:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=C4dRzVVW/Mbbc/tGJ090vnkmhNU+E6lwXzPjnhVvhUlyhkJumJzWuvo7I4reHIF4IcNfcw3ApYFbn1sne0dnxLyu9zkTjiG2vuEeF40UmsmSUpgTtu0R10SYU2hmbm9i8aRMkIBia3DnmXAg5T/9DtB4T3kzQzuoD4aWRI+0DlWqT/k6G0cen2i0Lw2YpreiWDgmz1zWo7jhTodVbtmLS22YBu9yzp8TiRsjH12OZiOYb+uYKoaR5P6B4C+XZoCNYa5Ai1O5PxaEotXi69IrzBQVZ5wAEvAWD6XjHZANmIVH+Mi3GuJH24uMFcN6VMfVSc4Wmm9MYN60Ev4vTRx2VQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=mN115WYMdXV08PljWxqUP2AhmB9hMDME0OtPNuSTKhM=; b=eIUxHmfVtJbddTHPFOjzFH3Bw88cHm7WIKoh8Zb4bYj61lsdHys26t0Mtj2nIwq6yDpK0Vn1ToNsjuLddKcQCpqLjhKd7Lu7TfcWzhQUCgSCl83qy8RFjMCDtvjubmUlNWQeSWGdkXYPU51YwjSONo0dN8ZxUgPcxnJz7HUX50FJ/WGfcrDN2j8tGb5CA7cNhXXrUQpTCLTZepWXwAotta2zyilsHPlBeL+qoUoWz7xX31YGMn4XEovD+KVpg6sC9zq2eCxWJNhiUqB17yh+ULZZA8Lbu9fHx4TjmxuK7KSc0fvLdsPt5XoSI5k/W0ruatDIIaq0HoP5g1iPYv46xg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=redhat.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=mN115WYMdXV08PljWxqUP2AhmB9hMDME0OtPNuSTKhM=; b=PZE15o/Fiq0BZZrRhxD1sCEk9V1lh1RMlNwF3b8541302zQ4lv74FOxsZJgyXEN/3txM+8rkCuaKdlQdP8rvXOAuWtnECOHXGG/f7ojR3oAyhEu++ogEpJtqW4JRJRFjOEo2tbc5FHOCX7LDQuhmSd7vhqSDWa+cyd1+jhUv/kU= Received: from DM6PR02CA0102.namprd02.prod.outlook.com (2603:10b6:5:1f4::43) by DM6PR12MB4249.namprd12.prod.outlook.com (2603:10b6:5:223::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6387.30; Tue, 16 May 2023 02:56:24 +0000 Received: from DM6NAM11FT112.eop-nam11.prod.protection.outlook.com (2603:10b6:5:1f4:cafe::ad) by DM6PR02CA0102.outlook.office365.com (2603:10b6:5:1f4::43) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6387.30 via Frontend Transport; Tue, 16 May 2023 02:56:24 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by DM6NAM11FT112.mail.protection.outlook.com (10.13.173.77) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6411.15 via Frontend Transport; Tue, 16 May 2023 02:56:23 +0000 Received: from driver-dev1.pensando.io (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Mon, 15 May 2023 21:55:52 -0500 From: Shannon Nelson To: , , , , , CC: , Subject: [PATCH v6 virtio 11/11] pds_vdpa: pds_vdps.rst and Kconfig Date: Mon, 15 May 2023 19:55:21 -0700 Message-ID: <20230516025521.43352-12-shannon.nelson@amd.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230516025521.43352-1-shannon.nelson@amd.com> References: <20230516025521.43352-1-shannon.nelson@amd.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6NAM11FT112:EE_|DM6PR12MB4249:EE_ X-MS-Office365-Filtering-Correlation-Id: a6577c5e-2c6f-4527-73ec-08db55b9228c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: LPjXxbFsxcnSdvmx+IG1SsRo9jm65X6bcfeeGhiO7eoQ7VsdiV7Cj6BXpJ2c3rrsXfWhKCNNe6H4FlXP8F5Mp4p51bFNSoLK7YFJnC4w+fC/o1EujkgfO8FbTIFqugoIZvjlf90B9Xg5HNFErC9gYE9kOM177HF0fxHj7kI0TdSEe3R6TFEob5kONGlNZQhOUnqNc2iEYrCMnKv4wsFNdcSyJ0wFYmFd53W/ZgfWxUwjrmnfDe8DKcua5MSD5eP2KNIH/MBmH3JFaInDeWZR4dwMfxtwhEK0z2fawQvoLDaGzK03tYBB4k/uuPZADumjt5pUyllzddWK+6TpanfMEniMfQdec2KDbVmzBXIeZ8wOA11o7Lbczw3KTjgqxpyonE87xk/4yb1iEVvRa8qMBf2zRJH3p47MccUECoegPIrMIqKumcAbGkWsUKhobMFjJD7YOVRXWku06fSJ13JsCmoz5V0PbnkQRJIfRSohQMxPHIcu3gTxZg5/22fek+r4RhRrtZTNO7s2SxxZJDAMm4JLDDB0YQUTTwvqPd6C0Iwt2ZaTJ4yN4Y7WjGlAaCbQi/tN976J6UZR4/fj3uYBf3e6qWMbxN5kSugvQVkWkZIQHPxWMBW/Wjkw2phAtb2OQJeOhjuVvYvBCcdav6JOJvxYHfKKS4KODkDpIW0QyUamftCKDINgehohyI6sGPuQUvc0aV+AVTY4p++WEowbP3DWimD9EbLi4lgtWqg4XQvzPvUnqlC1jttisOWhe8Wfr6sjV6uRC1xjRO+kyWTMCJBQ6NW5KFb493FQQdXLsqnsBGKAsFB8MQLmuC1SWSx2 X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230028)(4636009)(376002)(396003)(39860400002)(136003)(346002)(451199021)(36840700001)(46966006)(40470700004)(40460700003)(66899021)(70586007)(4326008)(70206006)(478600001)(86362001)(316002)(110136005)(54906003)(36756003)(426003)(47076005)(26005)(1076003)(186003)(83380400001)(36860700001)(336012)(43170500006)(5660300002)(8936002)(8676002)(44832011)(6666004)(2906002)(2616005)(40480700001)(81166007)(82310400005)(82740400003)(16526019)(356005)(41300700001)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 May 2023 02:56:23.9216 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a6577c5e-2c6f-4527-73ec-08db55b9228c X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT112.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB4249 X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Add the documentation and Kconfig entry for pds_vdpa driver. Signed-off-by: Shannon Nelson --- .../device_drivers/ethernet/amd/pds_vdpa.rst | 85 +++++++++++++++++++ .../device_drivers/ethernet/index.rst | 1 + MAINTAINERS | 4 + drivers/vdpa/Kconfig | 10 +++ 4 files changed, 100 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@vger.kernel.org + +For more specific support needs, please use the Pensando driver support +email:: + + drivers@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 e2fd64c2ebdc..c3f509eeaf1d 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -22296,6 +22296,10 @@ F: include/linux/vringh.h F: include/uapi/linux/virtio_*.h F: tools/virtio/ +PDS DSC VIRTIO DATA PATH ACCELERATOR +R: Shannon Nelson +F: drivers/vdpa/pds/ + VIRTIO CRYPTO DRIVER M: Gonglei L: virtualization@lists.linux-foundation.org diff --git a/drivers/vdpa/Kconfig b/drivers/vdpa/Kconfig index cd6ad92f3f05..656c1cb541de 100644 --- a/drivers/vdpa/Kconfig +++ b/drivers/vdpa/Kconfig @@ -116,4 +116,14 @@ 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" + select VIRTIO_PCI_LIB + depends on PCI_MSI + 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