From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM04-BN3-obe.outbound.protection.outlook.com (mail-eopbgr680064.outbound.protection.outlook.com [40.107.68.64]) by dpdk.org (Postfix) with ESMTP id EF3821B44C for ; Wed, 20 Jun 2018 08:14:30 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=FqFU6w/AKzs6tO6gprDVagq0oIeXRelRreQRl/sVc4k=; b=BdFxdL4qeZiFCgyQKaS8sUytJzvNPZfuRS9D7WKbZDNK/+l8vt2fNtLdqxiUvCRDNVKWLjbaLTnoGc7ChU6/xCDVHpGtUDBpN38f8hEtslUarsbge43UHvzKXEt4ZBc8M+1NzUGlknGBr+PUi3i0jMZ1+ZsVes3aVrmSYw4cYf8= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.JacobKollanukkaran@cavium.com; Received: from jerin (171.61.94.72) by CY1PR07MB2521.namprd07.prod.outlook.com (2a01:111:e400:c636::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.863.19; Wed, 20 Jun 2018 06:13:09 +0000 Date: Wed, 20 Jun 2018 11:43:00 +0530 From: Jerin Jacob To: Cristian Dumitrescu Cc: dev@dpdk.org, dan.daly@intel.com Message-ID: <20180620061258.GA31043@jerin> References: <1524072121-237519-1-git-send-email-cristian.dumitrescu@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1524072121-237519-1-git-send-email-cristian.dumitrescu@intel.com> User-Agent: Mutt/1.10.0 (2018-05-17) X-Originating-IP: [171.61.94.72] X-ClientProxiedBy: CO2PR18CA0047.namprd18.prod.outlook.com (2603:10b6:104:2::15) To CY1PR07MB2521.namprd07.prod.outlook.com (2a01:111:e400:c636::12) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 7e20b545-726d-4004-09af-08d5d674e64b X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(711020)(2017052603328)(7153060)(7193020); SRVR:CY1PR07MB2521; X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2521; 3:JiZw4eGx8DGIU3ivFsDmpA05qayrvw7gFTnp2KYEWrpwN873sG3/ZGy2N+HDGsyvy4EWOoI0sxxCvMIHUEk7bHfSvjMsRpMoVd6rqzqiZ6pjbB10DtD5MnJ9qOR2TZagbgNBhtMjXhTl3BxkICThMwUmgVxy5y6dG7tHN9Qknm7tJZLo/hJQNr8eg0ZFcgyOv7RHSNokvWn2eZ43dPM+I8J461f7OA9e+JXbZY11nRoWqoMudwxF3Iyk9a9VhMnD; 25:tFGn5jNr3mKtU86GvxAjkV41Ia/uPiDc/08fzmDyKKM9gJu6cxcEiR4CkDPCWS1RMJU2uj47JsSWHcqufCa11OlLio4TYJ4Tnt70fTTPY3UBYSiIGiV1aL2LTWsJloQ+dVwCQhghxFk8lNOtJS3rQIPwqicdpjxd1Q1aunkWcvkFe/rQDWGlL/ZbZ5XuntfwARAeL9lKyFCp5WJRuKhHFy2NNC+EThuwYeEQVHVbJMBCtZuYC6fZUaZNFAqHOdhItapfhI9gLc8Mi2BE+HJrDaVgyCKVZAP+m5OSQuJYD3ds4KF09gk82BbWcY6fBxll2Cwi4cS3t6gr+Tfpf8euMg==; 31:S5+twTzbx9kQDgvAAkt+wmcC6kA3CffZNB9UGW3DyqBioFm2jZiVICz9593Bkq5B89rQXx/yLM9CXQsh7AR2uRCqrWfc4Mnsg7p52JbYDrSSsNZ6yt+TlkknsiEDPRWWhFZTT4gdbjaXyVy4NIi1hkPZ5N7dzrjcG5JqljEdL+hBCIDK+4rGqVNkplUHzPDz/d1kjaBS723bmfi+NevoUns7PHqVAUN9nhiCBIuBsBw= X-MS-TrafficTypeDiagnostic: CY1PR07MB2521: X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2521; 20:TR47DvCxb7JddQb6TfAG9/hvO0HfzB/a1BAUxfmEXMikVOyyNPHBTMSzXuSAIdVgWGJ+Wcg5U5RoNVz6+Pl4ZUH67MYslhlrQqpe+7O/4dhhZiIBciMZhkygcqEbL++9+7yea17CAHGiIQO/+E1obp3VpaK9308nGoadxwpevZ2z2HVjBofaRTpOpTzj3TIsvjlVMGUY0DnhEPP09RD6LP4VsduwejH+Z/rscQMV4UvXmBpVfQ01TvAZCCU0d02pQlCL+vuyUrr/ZadJRfI91SrOdO9XVIaHQkkVZs0EkdPMz5xlLJeXDRjq8ERqanF3B9kFhbd2ZU2ylKYwyAnUnUxYZdDYIiXOOO2qogUeXN4KSQtJEeRGtOctoYYfc8uoHP0A7+ZkXvYdL2FOyK0DKaX7tCAvhiizrmDXgDvHdmTOSXLyA6Wyppdtw1+870IMJwCRFTkJTD1btFZgFM5jJS+Q6ORgLSiG243gad2vepAro0o8AtU5WU4DMB776tunb/jn7kzl+IFLYgOk7Try5zaFsWI3/m74w0A8APm51R/PiRJFDanjj/d6xfX2pt+S6hbR/Xgp2EiPK5nnQxLru3u9IL7Y21BXrfjEJ1lFX3s= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(166708455590820)(228905959029699); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(93006095)(3231254)(944501410)(52105095)(3002001)(10201501046)(149027)(150027)(6041310)(20161123558120)(20161123562045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(6072148)(201708071742011)(7699016); SRVR:CY1PR07MB2521; BCL:0; PCL:0; RULEID:; SRVR:CY1PR07MB2521; X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2521; 4:FUwcMyuMpMfMkifBbwu3YdhngNpeQI2xOI4kM82NHXsTMtA2Kz9gsrY4DvHGhesIyYfGrSLaOnr+EtQZFWFHskWADkr77VzHqHuhCNBJcJ6vHrF3bAuH/kxHuGDinwbM8IFEe5yRwAReKB9P36NgMBEBhRUXjEDwwXL+Y7tblSp2DQWOtFHZZPXlt2JlHdblHmrH8/lRZ3Eg5uAtl5psc22JkTOGS7zsGRlxtyd72GDed/+ouN5LICo/K1CkJStwnj4kQxHVcxZGwP21V5AO/FBMk13qxmD91bi0PjCHNQIOv+eK7HUgUOtZJX6oLXsMf/PhvUnL4uFfNgN7KiJxRiyAk324JilwGQMDsWcfVKo= X-Forefront-PRVS: 070912876F X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(346002)(376002)(366004)(39860400002)(39380400002)(396003)(189003)(199004)(13464003)(106356001)(2486003)(8936002)(6246003)(25786009)(486006)(9686003)(33656002)(23676004)(26005)(966005)(44832011)(52116002)(72206003)(478600001)(76176011)(97736004)(4326008)(81166006)(33896004)(2906002)(66066001)(11346002)(52146003)(105586002)(446003)(50466002)(6496006)(81156014)(386003)(53936002)(2870700001)(8676002)(476003)(47776003)(956004)(33716001)(1076002)(316002)(55016002)(7736002)(5660300001)(6666003)(68736007)(229853002)(305945005)(58126008)(42882007)(6116002)(6306002)(3846002)(16526019)(186003)(6916009)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR07MB2521; H:jerin; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtDWTFQUjA3TUIyNTIxOzIzOlUvUzd4bURrVHBFRFdOTkpiOFZXb2dkOTlB?= =?utf-8?B?dHljZmhFTXpxWnc1L0VIRjdpS1lEeXVsQ2ZESUE3T3g0OVJ0ZVlJK3JhZVZx?= =?utf-8?B?WGZaNWZlUTZvWUdHS3FX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JXBs=; 24:q/bFH68OKlpjmenduF1YTbtJ7/loO8gQOhj7I3Qd8GQd5cDeId71Ovie5JlazOHpxLSnwlnNsrk5D7gTe0FVMwtDuY01s/5twE7l7b6NTwY= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2521; 7:oewVxth6ebp6ikoyO+cW/Wup/EH6UMJMaZ3sTWiSHrXAv8wp1uCdcrWIQrcjApVqQyRe8DffxgIx1NBsis4fGFofEDZjCO1GFgaJqg61K1IGrWPW9qemFk8yddyd/wNKEcB8zktPhVC/yVgNu6tWKdpH8JNAGwU67zgvsUhd+V22TGYnPl2SqP87dOGBgVUbXV5vVgewg2aY9mfpnN2bK6UjtuchOhfYPib5byUFHFlSCZoKmoU6e3IRVy0TZgIb X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jun 2018 06:13:09.2755 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7e20b545-726d-4004-09af-08d5d674e64b X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR07MB2521 Subject: Re: [dpdk-dev] [RFC] P4 enablement in DPDK X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jun 2018 06:14:31 -0000 -----Original Message----- > Date: Wed, 18 Apr 2018 18:22:01 +0100 > From: Cristian Dumitrescu > To: dev@dpdk.org > CC: dan.daly@intel.com > Subject: [dpdk-dev] [RFC] P4 enablement in DPDK > X-Mailer: git-send-email 2.7.4 > > P4 is a language for programming the data plane of network devices [1]. The P4 > language is developed by p4.org which is joining ONF and Linux Foundation [2]. > > This API provides a way to program P4 capable devices through DPDK. The purpose > of this API is to enable P4 compilers [3] to generate high performance DPDK code > out of P4 programs. > > The main advantage of this approach is that P4 enablement of network devices can > be done through DPDK in a unified way: > > 1. This API serves as the interface between the P4 compiler front-end (target > independent) and the P4 compiler backe-ends (target specific). > > 2. Device vendors develop their device drivers as part of DPDK by > implementing this API. The device driver is agostic of being called by the > P4 front-end. The device driver serves as the P4 compiler taget specific > back-end. > > 3. The P4 compiler front-end is target independent. The amount of C code it > generates is minimized by calling this API directly for every P4 feature > as opposed to vendor-specific free-style C code generation. > > This API introduces a pipeline device (PDEV) by using a similar approach to the > existing ethdev and eventdev DPDK device-like APIs implemented by the DPDK Poll > Mode Drivers (PMDs). Main features: > > 1. Discovery of built-in pipeline devices and their capabilities. > > 2. Creation of new pipelines out of input ports, output ports, tables and > actions. > > 3. Registration of packet protocol header and meta-data fields. > > 4. Action definition for input ports, output ports and tables. > > 5. Pipeline run-time API for table population, statistics read, etc. > > This API targets P4 capable devices such as NICs, FPGAs, NPUs, ASICs, etc, as > well as CPUs. Let’s remember that the first P in P4 stands for Programmable, and > the CPUs are arguably the most programmable devices. The implementation for the > CPU SW target is expected to use the DPDK Packet Framework libraries such as > librte_pipeline, librte_port, librte_table with some expected but moderate API > and implementation adjustments. > > Links: > > [1] P4-16 language specification: > https://p4lang.github.io/p4-spec/docs/P4-16-v1.0.0-spec.pdf > > [2] p4.org to join ONF and LF: https://p4.org/p4/onward-and-upward.html > > [3] p4c: https://github.com/p4lang/p4c > > Signed-off-by: Cristian Dumitrescu > --- > lib/librte_pipeline/rte_pdev.h | 1654 +++++++++++++++++++++++++++++++++ > lib/librte_pipeline/rte_pdev_driver.h | 283 ++++++ How about moving this as separate library(pipeline dev) with driver(plugin) interface and librte_pipeline based API being used as one plugin/driver. This will enable us to hook another HW based or HW-SW combination of plugins in future. Eventdev has capability to create pipeline that can be add in future as plugin/driver. The code to deal with rte_tm etc in plugin, you can make it as common code in the library. So that new plugin can be created based eventdev + other building blocks such as rte_tm. /Jerin