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 9FE9DA0524; Tue, 20 Apr 2021 02:48:05 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1DDBC41448; Tue, 20 Apr 2021 02:48:05 +0200 (CEST) Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by mails.dpdk.org (Postfix) with ESMTP id B3A8D40685 for ; Tue, 20 Apr 2021 02:48:03 +0200 (CEST) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 639685C00C4; Mon, 19 Apr 2021 20:48:03 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Mon, 19 Apr 2021 20:48:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=fm1; bh= haNxaMWarGx4567pR2geXzT3pG4R6M1Fn41u7V+437I=; b=nvFkJsoAl4JKgruU vVhTLjo0xerYTN+Bd2rugYKk41vmPjx7+YY2Tb2s8wF0Nxe9NuYVvYZlOdnpViXn hbB4dLFm6pARtCmoB9P2Hponc85EwQXThC6B+vIybtGVztAY+H+Th4cqGZtE2G6w whhs5XMJxs0KBDUm+Be+8ZJv/bYWuZpwO3oLXARMwDgYq1e75GNO3Kc7MMSLFq7o QbR+kMyyG5HSxkD8Re7FqTFk05IX30L+uQvRzQTb8T8M0N0Rg9obIi3Ua1l9o6Ub dIVBxdaYjG0cEokTug2q5+Ia5bg1WdeiCoLeTZSYLk61hta6GveTnCL/KHfmh6Ju PBpqrA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=haNxaMWarGx4567pR2geXzT3pG4R6M1Fn41u7V+43 7I=; b=mC6RryRTG6l4+MAWozhYD0Lsy0oFeJzgIUaHCXMrGKL4TIdIIAEq23kT5 +R7A27p0seoPUGiuUHJ5WdQJEFJvEHIvis0J7MwtNJmWCGOo3YpLB4VZ1EM/HV1U 1RJSs7djCj7jnPnIbV14i1IugUwcMneWyMOEzDvX2iDbjJyIni9/myp6ZehWNC5M Tzmz6628Cc7hzcG4uvPjdwb3EEQB7jDmU4lTG8VAl8vBjsFE80ROoYTbDpmNTU29 nf4UnsYUaloZw+zFIIycS5rg2bg04/0xiusdmALMoeRCN8FzX3wzJJBZyun16Xli uR0vtFJ+cbMKPYiJn+VMm9rlIJE/w== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrvddthedgfeekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkfgjfhgggfgtsehtufertddttddvnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg ftrfgrthhtvghrnhepffdvffejueetleefieeludduuefgteejleevfeekjeefieegheet ffdvkeefgedunecuffhomhgrihhnpeguphgukhdrohhrghenucfkphepjeejrddufeegrd dvtdefrddukeegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhf rhhomhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvth X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 5273A240054; Mon, 19 Apr 2021 20:48:02 -0400 (EDT) From: Thomas Monjalon To: Cristian Dumitrescu Cc: dev@dpdk.org Date: Tue, 20 Apr 2021 02:48:00 +0200 Message-ID: <1799475.riq6yjk0ZW@thomas> In-Reply-To: <20210411232338.4005-2-cristian.dumitrescu@intel.com> References: <20210411232338.4005-1-cristian.dumitrescu@intel.com> <20210411232338.4005-2-cristian.dumitrescu@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH 2/2] pipeline: autodetect endianness of action args 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 Sender: "dev" 12/04/2021 01:23, Cristian Dumitrescu: > Each table entry is made up of match fields and action data, with the > latter made up of the action ID and the action arguments. The approach > of having the user specify explicitly the endianness of the action > arguments is difficult to be picked up by P4 compilers, as the P4 > compiler is generally unaware about this aspect. > > This commit introduces the auto-detection of the endianness of the > action arguments by examining the endianness of the their destination: > network byte order (NBO) when they get copied to headers and host byte > order (HBO) when they get copied to packet meta-data or mailboxes. > > The endianness specification of each action argument as part of the > rule specification, e.g. H(...) and N(...) is removed from the rule > file and auto-detected based on their destination. The DMA instruction > scope is made internal, so mov instructions need to be used. The > pattern of transferring complete headers from table entry action args > to headers is detected, and the associated set of mov instructions > plus header validate is internally detected and replaced with the > internal-only DMA instruction to preserve performance. > > Signed-off-by: Cristian Dumitrescu > --- > examples/pipeline/examples/vxlan.spec | 41 ++- > examples/pipeline/examples/vxlan_table.py | 44 ++-- > examples/pipeline/examples/vxlan_table.txt | 32 +-- > lib/librte_pipeline/rte_swx_ctl.c | 15 +- > lib/librte_pipeline/rte_swx_ctl.h | 6 + > lib/librte_pipeline/rte_swx_pipeline.c | 282 ++++++++++++++++++--- > lib/librte_pipeline/rte_swx_pipeline.h | 4 - There are compilation issues in the CI: https://patches.dpdk.org/project/dpdk/patch/20210411232338.4005-2-cristian.dumitrescu@intel.com/