From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id F209AA0542; Mon, 6 Jun 2022 08:45:22 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 92E0940A7F; Mon, 6 Jun 2022 08:45:22 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id 1869640150; Mon, 6 Jun 2022 08:45:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1654497920; x=1686033920; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=o9ChGKf8U1DhdNEgQG4We4ZU4JpsHgjT64hKix1VmnM=; b=j/vZ3JGKRSUaxOToOFZToOKt4yO6DQDqiXjO3bJKykq3YBgiLFY1ni/a ssYEyc6JLRQcVbtLPawhdG1J2ano+Yehb+OTdgWN1J1qJJQRzBNOL5U2e fvpp6Iiyp9Ry61Cn0e6Non1oU5bVixqfzqesHblaCj4QlcaCGyRNLtYDV Fy5TgcR0AXUHAsJ7ZIv9lOAZbO5zVOdDKjjHpBT2p81lf+NSgsbU1q1rW EEYYmXI5TDP70nleCSOJfrKzf8lQ0mq5ZuhuD9oQfKQOBII70KZnABeCd 3Uh9KFIOS63iPt701SeQnqC7dDDTha2ReqFbRqt7Kj6j9oQJhlWZb/sXu g==; X-IronPort-AV: E=McAfee;i="6400,9594,10369"; a="301989681" X-IronPort-AV: E=Sophos;i="5.91,280,1647327600"; d="scan'208";a="301989681" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jun 2022 23:45:18 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,280,1647327600"; d="scan'208";a="532010553" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by orsmga003.jf.intel.com with ESMTP; 05 Jun 2022 23:45:17 -0700 Received: from fmsmsx608.amr.corp.intel.com (10.18.126.88) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Sun, 5 Jun 2022 23:45:17 -0700 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx608.amr.corp.intel.com (10.18.126.88) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Sun, 5 Jun 2022 23:45:17 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27 via Frontend Transport; Sun, 5 Jun 2022 23:45:17 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.169) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.27; Sun, 5 Jun 2022 23:45:16 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hAmau7gdf6VTYIzrWbxhi/CA32NNns7s2UvmYWMmNT7HbgO4Xoyb0L9yz6tJExA9yxxOZ/ts8D42MR9EaIw1hM/tyQFONJh88IfCfHguafDCr5e+vrjdRiROjWQKDeVm4gRHapkPXjAnksWtsQkfA3Ft/HivvBUSayvLkDDlqOD44B2Fsz61gr/ICreSixhCtZW7MCfoDXgV3ESVlTokahEDhsZw17yODr4CE0uAGlhAckbTeg6X7YwwkFCkNBnGwDTwA+Kpy+uZUx3UkY1bW5d7aJdLMQ3s6o6+lGcr56u6LZdiI54N9PcWp8GVk1MxnLVdP+5g+4hIgWRD4SBWmQ== 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=CoLJRAFs7YJv0MMh1eG2SxKPnIcjGjLiW8D2VxXwWSM=; b=ZGRh2i6kFEwn77U42FnT3j6U/KrXub9R0Do37hyNhsU0/47MXp7DUSyaSDEB+LLDD7i1MWn7Mb176QqF5iK4/afDwtpf+ownMT13KSoWjnyJjZ1QQobKKD8FCtfA9pvp5hiygzPPtrnZBQnKppcxfE+YiLCGsd8Q1/w2FcdbFQeVQRuRj6d6OJr1XH42G6QvgIO4fgb4JrXBJUw1peGNOkczhO1Z1zYlEzl9tTMneMQGxx7CtQu59/tXOfWzq9Qcx0KO29xiQ5Smo82Oudg2TtkjvYsrsUTPako1GqsazfxwzBTurIv2P4soebkEj9d3ZzFV9bOxs7mmjaw1H8bYjQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from BN9PR11MB5483.namprd11.prod.outlook.com (2603:10b6:408:104::10) by MN2PR11MB4464.namprd11.prod.outlook.com (2603:10b6:208:188::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5314.12; Mon, 6 Jun 2022 06:45:15 +0000 Received: from BN9PR11MB5483.namprd11.prod.outlook.com ([fe80::4d94:5d8b:51d7:d8b4]) by BN9PR11MB5483.namprd11.prod.outlook.com ([fe80::4d94:5d8b:51d7:d8b4%9]) with mapi id 15.20.5314.019; Mon, 6 Jun 2022 06:45:15 +0000 From: "Zhang, Tianfei" To: "Huang, Wei" , "dev@dpdk.org" , "thomas@monjalon.net" , "nipun.gupta@nxp.com" , "hemant.agrawal@nxp.com" CC: "stable@dpdk.org" , "Xu, Rosen" , "Zhang, Qi Z" Subject: RE: [PATCH v4 5/5] guides/rawdevs: add description of ofs in ifpga doc Thread-Topic: [PATCH v4 5/5] guides/rawdevs: add description of ofs in ifpga doc Thread-Index: AQHYcaONxl4P3EAYvUeVGXQtV04Iwa1B/iqg Date: Mon, 6 Jun 2022 06:45:15 +0000 Message-ID: References: <1653535974-1379-1-git-send-email-wei.huang@intel.com> <1653640433-5066-1-git-send-email-wei.huang@intel.com> <1653640433-5066-6-git-send-email-wei.huang@intel.com> In-Reply-To: <1653640433-5066-6-git-send-email-wei.huang@intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.6.500.17 dlp-reaction: no-action authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 81e1c818-8c95-4bbd-84c2-08da47881ce9 x-ms-traffictypediagnostic: MN2PR11MB4464:EE_ x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: o2aVWx7KZov4UtLJ41DJf5oFBxojamjcEloEcYEPO5CcaNj3KrDCoMDB2V8qNpz5GPYy/U/xP7UdtlW+Y5vTaf6NE/z+Pd+75xPmyddem1ZnWwET3H66dcqEsqJAQn1ChoAyoScsRb2cBcSCUR1HIcvKF2luVsEBZAUmXscnl5kq/1SjHyzEjGY8SjXncAaodpaDWBAZWKsLcVfn2ix2Bek7Z2BVIA5/O4+sJITEsGnA5iNWFEvChkvussRu9MhVr4cwOJf5EOi7sKHwcSnyG0PKgu6NhVVIXTKT6YE02aB0YNmlQNe1yPhqmJRBj9VH5kVoDiW8d8yILqoFfWxjx1fMSTy9IVArpAJCqEygAnOPUatTiSON0H3CzcqPi9rDiasIr4A0tGHEOEgY8Qv6WY7vr1zQrqAuwKr2UpTHW3hEqjwlxbmuM09Y7AxjS7UjJwulGsvbgD03hV8enK9AAPhlk+LSDXSDwqJe/JKBT+Q+rhDuMgwHBaiZxtcnF6kqWP2LKOoBbic/5XytkcX4R9E137LnQ4SilejR+jgHAiCXT8kL1elsXV7k/LRqwaR4GoEXatWlkLSZ89GDDD4Vtf9BGZs3541rxc2dA3hTczniKFIx44lkFDKMCr7GDFF98YRoOapKR09DbRYpCuFAMn7tKuP5pBWRi25+tPBp50USA1ng9b/xyvNNc129Zf9y3rW3vf9h0XTM9j1HKyg4Gw== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BN9PR11MB5483.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(66946007)(66476007)(4326008)(64756008)(66556008)(66446008)(76116006)(82960400001)(107886003)(53546011)(8936002)(8676002)(52536014)(122000001)(71200400001)(7696005)(26005)(83380400001)(9686003)(110136005)(508600001)(54906003)(38100700002)(5660300002)(33656002)(316002)(55016003)(38070700005)(2906002)(186003)(6506007)(86362001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?Mi9YjP+e61Pm2ZCF60qkOiPzBo1UawuUfppja60UpkgX7wGgO74AxIDHWzgE?= =?us-ascii?Q?5VeUARikqa/7gCrpLg72pv+jnvXCafa4UT0dVRUzJilmFwnaW6sp7JJG4xO5?= =?us-ascii?Q?yFvvf4vmPgUSDXHQpzsDAq9a6OK8zPpdAb67Nlz1yuiy9dSX7v0dhTpWWNQi?= =?us-ascii?Q?ppX0Z7stCRNH/++5YfcCwtLq+rXdUsTKtzDRc/NncK8RnziF896WmBw8MdY9?= =?us-ascii?Q?7y2WANSImgA1Uj6daNOHcxeRdQ4nbw0hQm2Vaht32lnQSZxa/e/3cO1/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3+888SJo9arRRjZuTNcBn5kfpk1?= =?us-ascii?Q?81+WJOEABapS75DuxEq1EMKMBu2LDaVWXrckir65G1nxb3cu2U+Tw0iIBCIn?= =?us-ascii?Q?PrBMPLUQeGuzON9sVBbui52KB0g8WbS+XnbZ4C+pel2AP/6nEqGb6KIpgDHX?= =?us-ascii?Q?3qoYi8l7680zXtyjrcRQcTztm6+SL3dfzu/Tj0OHxmyVOR9W4vjZYjEeUkLA?= =?us-ascii?Q?WYx5zKr4AN2dOkHJoQ+zO6HRELIhbh3wjHEzLXMEqs0ZnGMXnVxVBBctAkYi?= =?us-ascii?Q?bazcU5Dv0u+RA5rjFtJbs9IOA7tdmYopPD1TrJ2meBskPB8G+5TfjDJi+rAe?= =?us-ascii?Q?baDP1kUerHqwHqu45wzvJGqVWWEqCkP8Sl2LCR9s+FM4hBEy4G4Rh3cUVt1H?= =?us-ascii?Q?VKksGX1UDn50ik9bwjE4gw7TdWpsYMyi6Vw2LwaOLvly6J7H5T7raUXluUeN?= =?us-ascii?Q?HMws39CSLN+gNE7wmKWJa9uy+hp9+kwcmcDXhJUrynFiEA4dH65Lhy7M5E4M?= =?us-ascii?Q?wKwZWFKsa0rPcEuNr34RqaXgxY6pMyzY7OyFmZJYCcWke1EdqBn4t/uHvRLQ?= =?us-ascii?Q?FENZbm1+Kw=3D=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BN9PR11MB5483.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 81e1c818-8c95-4bbd-84c2-08da47881ce9 X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Jun 2022 06:45:15.2380 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: EvH41vM/eAPw5GG+7Ac6+S6vrlYPfHGk8rTTqKcHMtobw5PUPW8UovWo3MuhZMUUU/ZVAxJXH7Nl94uY/1uKxA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB4464 X-OriginatorOrg: intel.com X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org > -----Original Message----- > From: Huang, Wei > Sent: Friday, May 27, 2022 4:34 PM > To: dev@dpdk.org; thomas@monjalon.net; nipun.gupta@nxp.com; > hemant.agrawal@nxp.com > Cc: stable@dpdk.org; Xu, Rosen ; Zhang, Tianfei > ; Zhang, Qi Z ; Huang, Wei > > Subject: [PATCH v4 5/5] guides/rawdevs: add description of ofs in ifpga d= oc >=20 > OFS (Open FPGA Stack) specification is introduced briefly. >=20 > Signed-off-by: Wei Huang > Reviewed-by: Rosen Xu > --- > v2: update description per Tianfei's comment > --- > doc/guides/rawdevs/ifpga.rst | 105 > ++++++++++++++++++++++++++++++++++++++++++- > 1 file changed, 104 insertions(+), 1 deletion(-) >=20 > diff --git a/doc/guides/rawdevs/ifpga.rst b/doc/guides/rawdevs/ifpga.rst = index > dbd0d6e..3dce57a 100644 > --- a/doc/guides/rawdevs/ifpga.rst > +++ b/doc/guides/rawdevs/ifpga.rst > @@ -1,5 +1,5 @@ > .. SPDX-License-Identifier: BSD-3-Clause > - Copyright(c) 2018 Intel Corporation. > + Copyright(c) 2018-2022 Intel Corporation. >=20 > IFPGA Rawdev Driver > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > @@ -100,3 +100,106 @@ The following device parameters are supported: >=20 > If null, the AFU Bit Stream has been PR in FPGA, if not forces PR and > identifies AFU Bit Stream file. > + > + > +Open FPGA Stack > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +Open FPGA Stack (OFS) is a collection of RTL and open source software > +providing interfaces to access the instantiated RTL easily in an FPGA. > +OFS leverages the DFL for the implementation of the FPGA RTL design. > + > +OFS designs allow for the arrangement of software interfaces across > +multiple PCIe endpoints. Some of these interfaces may be PFs defined in > +the static region that connect to interfaces in an IP that is loaded via= Partial > Reconfiguration (PR). > +And some of these interfaces may be VFs defined in the PR region that > +can be reconfigured by the end-user. Furthermore, these PFs/VFs may use > +DFLs such that features may be discovered and accessed in user space > +with the aid of a generic kernel driver like vfio-pci. The diagram > +below depicts an example design with one PF and two VFs. In this > +example, it will export the management functions via PF0 and > +acceleration functions via VF0 and VF1, leverage VFIO to export the MMIO > space to an application.:: > + > + +-----------------+ +-------------+ +------------+ > + | FPGA Management | | DPDK App | | User App | > + | App | | | | | > + +--------+--------+ +------+------+ +-----+------+ > + | | | > + +--------+--------+ +------+------+ | > + |IFPGA PMD driver | |AFU MF driver| | > + +--------+--------+ +------+------+ | > + | | | > + +--------+------------------+---------------+------+ > + | VFIO-PCI | > + +--------+------------------+---------------+------+ > + | | | > + +--------+--------+ +------+------+ +----+------+ > + | PF0 | | PF0_VF0 | | PF0_VF1 | > + +-----------------+ +-------------+ +-----------+ > + > +As accelerators are specialized hardware, they are typically limited in > +the number installed in a given system. Many use cases require them to > +be shared across multiple software contexts or threads of software > +execution, either through partitioning of individual dedicated > +resources, or virtualization of shared resources. OFS provides several > +models to share the AFU resources via PR mechanism and hardware-based > virtualization schemes. > + > +1. Legacy model. > + With legacy model FPGA cards like Intel PAC N3000 or N5000, there is > + a notion that the boundary between the AFU and the shell is also the = unit of > + PR for those FPGA platforms. This model is only able to handle a > + single context, because it only has one PR engine, and one PR region = which > + has an associated Port device. > +2. Multiple VFs per PR slot. > + In this model, available AFU resources may allow instantiation of man= y VFs > + which have a dedicated PCIe function with their own dedicated MMIO sp= ace, > or > + partition a region of MMIO space on a single PCIe function. Intel PAC= N6000 > + card has implemented this model. > + In this model, the AFU/PR slot was not connected to port device. For = DFL's > view, > + the Next_AFU pointer in FIU feature header of port device points to N= ULL in > this > + model. On the other hand, each VF can start with an AFU feature heade= r > without > + being connected to a FIU Port feature header. > + > +The VFs are created through the Linux kernel driver before we use them i= n > DPDK. > + > +OFS provides the diversity for accessing the AFU resource to RTL develop= er. > +An IP designer may choose to add more than one PF for interfacing with > +IP on the FPGA and choose different model to access the AFU resource. > + > +There is one reference architecture design using the "Multiple VFs per P= R slot" > +model for OFS as illustrated below. In this reference design, it > +exports the FPGA management functions via PF0. PF1 will bind with DPDK > +virtio driver presenting itself as a network interface to the > +application. PF2 will bind to the vfio-pci driver allowing the user > +space software to discover and interface with the specific workload > +like diagnostic test. It leverages AFU PMD driver to access the AFU reso= urces in > DPDK.:: > + > + +----------------------+ > + | PF/VF mux/demux | > + +--+--+-----+------+-+-+ > + | | | | | > + +------------------------+ | | | | > + PF0 | +---------+ +-+ | | > + +---+---+ | +---+----+ | | > + | DFH | | | DFH | | | > + +-------+ +-----+----+ +--------+ | | > + | FME | | VirtIO | | Test | | | > + +---+---+ +----------+ +--------+ | | > + | PF1 PF2 | | > + | | | > + | +----------+ | > + | | ++ > + | | | > + | | PF0_VF0 | PF0_VF1 > + | +-----------------+-----------+------------+ > + | | +-----+-----------+--------+ | > + | | | | | | | > + | | +------+ | +--+ -+ +--+---+ | | > + | | | Port | | | DFH | | DFH | | | > + +-----------+ +------+ | +-----+ +------+ | | > + | | | DEV | | DEV | | | > + | | +-----+ +------+ | | > + | | PR Slot | | > + | +--------------------------+ | > + | Port Gasket | > + +------------------------------------------+ > -- It looks good for me, you can add: Acked-by: Tianfei Zhang