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 EFA6AA0548; Tue, 20 Apr 2021 21:57:56 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7E9C941735; Tue, 20 Apr 2021 21:57:56 +0200 (CEST) Received: from wout1-smtp.messagingengine.com (wout1-smtp.messagingengine.com [64.147.123.24]) by mails.dpdk.org (Postfix) with ESMTP id 47BE141439 for ; Tue, 20 Apr 2021 21:57:55 +0200 (CEST) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.west.internal (Postfix) with ESMTP id ED36F3B18; Tue, 20 Apr 2021 15:57:53 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Tue, 20 Apr 2021 15:57:54 -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= bo3wmLJA5RCRxVyaC8DYO1hbmKc2su6EIKVLRk8If9Q=; b=nHpfkiXfVkP9EIGt Dyt9n0lQqWDZjmBn2RH/8PiC45RXBPUqeAhYFGrSRL6Qf7IKPdz5XiOs/RPtcqu5 hC5TFZh5TL8bHiqHtYTG4tfz1tGEYJL0ArO1uRA1nn07toi2uXmZcESXv4ph/xwg JnNpBM8W3ci3r/mMOSlV/0eF7u7iU1kdUmwSX1SsLrm6Kv0/DP18pcdGTVQWvRPW +ztvM1eoL+2jhDRqojD8AmS6IhFgeB3OP3Zrr43qqCbecN8U6Sf/7+kEe5wV8S3o mgWCxWnsvMxv+ExiuFm8z4nRuxd2f3bcGzzgDEDCCDFK072GwK23HGKvhgdpl1eZ KvdKRw== 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=bo3wmLJA5RCRxVyaC8DYO1hbmKc2su6EIKVLRk8If 9Q=; b=uqHCf96iXIo9aJFp6FenXeUG2Kf5+61pZTFD5X6u/zgFc2Mf3pWwF5B1y iI3FOycjCwEF6mZ7Dj9uoLm4CY8M21h+1M4BndmssK/VClL/GfygNYVGyIl2Ns0E mhU320fYzzt/FSSW1AizCUF182DJIsGZYP4rSl6ymJA11NJsLBs1QG5mkoEfWX3w fxiDIa5mD6wGm9JB3ajDWUCiliTGYBbOOTgC4i5ehdrjAHjKJtelyTbnkHWgQMO0 aJFFXgs70egX8jqrEaY8SmVJ7hHpMrUZI0NTOXc+nJSHqUeKdsdVCXtlHJPaml4q oA01YuQgdVOF1H+ZE++A5Bw0J6Gfw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrvddtiedgudegiecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhm rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc ggtffrrghtthgvrhhnpedugefgvdefudfftdefgeelgffhueekgfffhfeujedtteeutdej ueeiiedvffegheenucfkphepjeejrddufeegrddvtdefrddukeegnecuvehluhhsthgvrh fuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgr lhhonhdrnhgvth 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 BC6B61080064; Tue, 20 Apr 2021 15:57:52 -0400 (EDT) From: Thomas Monjalon To: Cristian Dumitrescu Cc: dev@dpdk.org Date: Tue, 20 Apr 2021 21:57:51 +0200 Message-ID: <2003889.D9zfWNbQnx@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 Series applied, thanks