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 9AFB9A00C5; Thu, 15 Sep 2022 17:54:35 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 31D4F4021D; Thu, 15 Sep 2022 17:54:35 +0200 (CEST) Received: from wout2-smtp.messagingengine.com (wout2-smtp.messagingengine.com [64.147.123.25]) by mails.dpdk.org (Postfix) with ESMTP id 7D92040156 for ; Thu, 15 Sep 2022 17:54:34 +0200 (CEST) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id DF4853200A22; Thu, 15 Sep 2022 11:54:32 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Thu, 15 Sep 2022 11:54:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm2; t=1663257272; x= 1663343672; bh=86ANg5XP9J/7y/KApdQlJSvrm5Hs2VU6mhemaaRelrU=; b=w YE1K5XPRZG6MH+ape82HjiOIh2kkRD2KtyB9tz+dysF6PiL+dENso8h3/nx1cor3 b2r921IeC4biriaLU7/rbWv/eEZXeu/yv+DTm47pLlRVDds+Y61ACs7S4rKSqC8U pKL452Q1qrYyaAXKDBB2OIEI22aUtgBEnQSWrG7JWYNSaL1FcY9jq4pZsXICh4Ix /2rmVK/R1pU3RwGKO3YrUi0ykGj/BQ+LVFWMALevywli4YJrQRWo85IxFVyMamGI tpeVe45sCh8sPXo++u3sEHdzuh31EjGtYfrI6G4gBFhiOe3vdIuT3BC8mwdvo17M 3h9Y21S9eXv+tw8roqh3Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1663257272; x= 1663343672; bh=86ANg5XP9J/7y/KApdQlJSvrm5Hs2VU6mhemaaRelrU=; b=P kdkRSJFcQVPGCjN3gZgMPJ3DasC8QUvip9NGyRQ75RO4dhV3EqfZfxzp04ZBjqvq XNCFElQbnYb/7KyN6N+W4Fl9t6lemgPMt65+IDxKajgWMLLthPpPB2IErynWBc9P kNXhEnHKf8CJ9SXGjXl97ivXFvwP4Uc7zpjvNApsVGfQ5OxfjjTVeLnNVlowdT53 Vt+jYarEeanjjdXYLxIt8fHyqjqmrNB+MLcjLSp05zN/U+3FjbyTjYg+sniZzSr1 uLSX4PXDvyOmaGW+M5B2ZL4Jylm1qbCnjseniuhuYo/R4aSMslWuRxjB4Q8HObTT TzmH36iwOHkxpiqaGtUlA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrfedukedgleeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkjghfggfgtgesthhqredttddtjeenucfhrhhomhepvfhhohhm rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc ggtffrrghtthgvrhhnpeegtddtleejjeegffekkeektdejvedtheevtdekiedvueeuvdei uddvleevjeeujeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 15 Sep 2022 11:54:31 -0400 (EDT) From: Thomas Monjalon To: Cristian Dumitrescu Cc: dev@dpdk.org Subject: Re: [PATCH V6 00/17] pipeline: pipeline configuration and build improvements Date: Thu, 15 Sep 2022 17:54:29 +0200 Message-ID: <3212186.VqM8IeB0Os@thomas> In-Reply-To: <20220728151147.603265-1-cristian.dumitrescu@intel.com> References: <20220718130713.339003-1-cristian.dumitrescu@intel.com> <20220728151147.603265-1-cristian.dumitrescu@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" 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 28/07/2022 17:11, Cristian Dumitrescu: > The sequence of steps to build a SWX pipeline object are: >=20 > 1. Create the specification file (pipeline.p4 -> pipeline.spec): This tex= t file represents the > pipeline program that is typically generated by the P4 compiler or som= etimes manually created. >=20 > 2. Generate the C source code file (pipeline.spec -> pipeline.c): The C f= ile contains a C function > for every pipeline action and several C functions for the pipeline mai= n program. It allows the C > compiler to generate optimized code by having access to the entire pip= eline program rather than > using the small pre-build functions corresponding to the individual in= structions >=20 > 3. Build the shared object library (pipeline.c -> pipeline.o -> pipeline.= so). >=20 > 4. Load the shared object library (pipeline.so): At initialization, the p= ipeline object is =E2=80=9Cpatched=E2=80=9D > with the optimized C functions from the shared object library. >=20 > Previously, steps 2., 3. and 4. were implemented under the hood by the pi= peline library at the > initialization time in a completely hard-coded and non-customizable way. = The user was not able to > select the C compiler (GCC was assumed), the compiler version, the build = flags, the file locations, > etc. The code generation (step 2.) and library build (step 3.) were done = on-the-fly at init and > could potentially fail for many setup related reasons. >=20 > Now, this process is no longer done under the hood by the pipeline librar= y and the individual steps > are explicitly supported by the API functions. The code generation (step = 2.) is done off-line at any > time before the pipeline execution. The library build (step 3.) is also d= one off-line and is now > fully customizable by the user, who is able to gracefully access the gene= rated C code and decide on > the various build options. >=20 > We also take the opportunity to streamline the pipeline I/O port configur= ation by introducing an I/O > specification file. Essentially, the pipeline is now configured and build= based on two files: >=20 > a) The shared object library file (pipeline.so): It defines how the packe= ts are processed by the > program through tables and actions; the same P4 program can be execute= d by many pipelines. >=20 > b) The I/O specification file (pipeline.io): High level text file definin= g how the packets are > received and transmitted by the pipeline; this is not part of the P4 p= rogram, which is completely > agnostic about the pipeline I/O ports. This is defined differently for= each pipeline object when > initialized. Series applied, thanks.