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 0A279A0547; Thu, 29 Apr 2021 13:38:04 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E8E61410DD; Thu, 29 Apr 2021 13:38:03 +0200 (CEST) Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by mails.dpdk.org (Postfix) with ESMTP id B2B9C406FF for ; Thu, 29 Apr 2021 13:38:02 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 5E9295C0038; Thu, 29 Apr 2021 07:38:02 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Thu, 29 Apr 2021 07:38:02 -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= G5WVkBQOq0BCfCV/3yLeXT8xi7I46Pxh/0JzUv66tJM=; b=WQYZXgTlmHck/tR8 IZSn8XbgFPI9oOTZTobfmCl/+oU4FhkafZEvbZrr95beVPfQofLuhss6CitLAP0/ xn11E77Sr3gAJFf6s5zsVY0x1zw+mfy1X0DIZOIRhw00YAAuMuMIexEoK4VBT1jX QfnTDFByLku7V4UpzcqYRV4E+GzwhV2aFhZKGtO1CLN5msr23mF0o4u1veoPF0Nf gJ5PlJvkcHMUvwC+7U8HAAfPXVTX4RwMO5BfdR+8zyJrBe6IRODX4FQuthIDLWEY 9NEj+WrS/zt+trpkQP5Z/i2LFUwPEa2ahwGOIBfh0WKDIyi2/1KpCTdjCbp1XAV1 77zSiA== 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=G5WVkBQOq0BCfCV/3yLeXT8xi7I46Pxh/0JzUv66t JM=; b=wQuv/6Disq3kc+BcC9tjvmtmjWw+aCVimSqLrdE5odxVx88Ac4l5wtC2+ 1prhU8AvTIKAEM/WQsyN3yA5Km4FNEc22Q0xNOp12GL/FUqtP70j4PdLKFF9zlQx ZB2ygbBe9EUetu0LT7dzHosi0EoULToGxQAc5pckWe2zyjgieySFfViU3ENcDdaS h2jOJwUbT351ARhjL9E/NefnKi1aZuQpApSW0PnRxXa+zgYfCJBCVhWUBP8Btr0O 0MafeESX8DWHPK5iyRvT5nWyFBA0/iBbV9nN5Ob5ws4wxLDQsfwdF0y7fiWl/k7q jz23tIWhAC8hD4Y7pn/ABrhsOlRhw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrvddvgedggeefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkfgjfhgggfgtsehtufertddttddvnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg ftrfgrthhtvghrnhepudeggfdvfeduffdtfeeglefghfeukefgfffhueejtdetuedtjeeu ieeivdffgeehnecukfhppeejjedrudefgedrvddtfedrudekgeenucevlhhushhtvghruf hiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghl ohhnrdhnvght 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; Thu, 29 Apr 2021 07:38:00 -0400 (EDT) From: Thomas Monjalon To: Gregory Etelson , Ori Kam Cc: "dev@dpdk.org" , Matan Azrad , Raslan Darawsheh , Slava Ovsiienko , Ferruh Yigit , Andrew Rybchenko , Ajit Khaparde Date: Thu, 29 Apr 2021 13:37:58 +0200 Message-ID: <3390681.3kz1DZl0D0@thomas> In-Reply-To: References: <20210428175906.21387-1-getelson@nvidia.com> <20210429061634.3481-2-getelson@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v2 1/4] ethdev: fix integrity flow item 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" 29/04/2021 12:13, Ori Kam: > From: Gregory Etelson > > > > Add integrity item definition to the rte_flow_desc_item array. > > The new entry allows to build RTE flow item from a data stored in > > rte_flow_item_integrity type. > > > > Add bitmasks to the integrity item value. > > The masks allow to query multiple integrity filters in a single compare > > operation. > > > > Fixes: b10a421a1f3b ("ethdev: add packet integrity check flow rules") > > > > Signed-off-by: Gregory Etelson > > Acked-by: Viacheslav Ovsiienko > > --- > > lib/ethdev/rte_flow.c | 1 + > > lib/ethdev/rte_flow.h | 9 +++++++++ > > 2 files changed, 10 insertions(+) > > > > diff --git a/lib/ethdev/rte_flow.c b/lib/ethdev/rte_flow.c index > > c7c7108933..8cb7a069c8 100644 > > --- a/lib/ethdev/rte_flow.c > > +++ b/lib/ethdev/rte_flow.c > > @@ -98,6 +98,7 @@ static const struct rte_flow_desc_data > > rte_flow_desc_item[] = { > > MK_FLOW_ITEM(PFCP, sizeof(struct rte_flow_item_pfcp)), > > MK_FLOW_ITEM(ECPRI, sizeof(struct rte_flow_item_ecpri)), > > MK_FLOW_ITEM(GENEVE_OPT, sizeof(struct > > rte_flow_item_geneve_opt)), > > + MK_FLOW_ITEM(INTEGRITY, sizeof(struct rte_flow_item_integrity)), > > MK_FLOW_ITEM(CONNTRACK, sizeof(uint32_t)), }; > > > This fix is correct. > > > --- a/lib/ethdev/rte_flow.h > > +++ b/lib/ethdev/rte_flow.h > > +#define RTE_FLOW_ITEM_INTEGRITY_PKT_OK RTE_BIT64(0) > > +#define RTE_FLOW_ITEM_INTEGRITY_L2_OK RTE_BIT64(1) > > +#define RTE_FLOW_ITEM_INTEGRITY_L3_OK RTE_BIT64(2) > > +#define RTE_FLOW_ITEM_INTEGRITY_L4_OK RTE_BIT64(3) > > +#define RTE_FLOW_ITEM_INTEGRITY_L2_CRC_OK RTE_BIT64(4) > > +#define RTE_FLOW_ITEM_INTEGRITY_IPV4_CSUM_OK RTE_BIT64(5) > > +#define RTE_FLOW_ITEM_INTEGRITY_L4_CSUM_OK RTE_BIT64(6) > > +#define RTE_FLOW_ITEM_INTEGRITY_L3_LEN_OK RTE_BIT64(7) > > + > > I don't think that we need those flags, this means two option for the same API, > I suggest that we remove the value from the struct. To make it clear, these flags were for use with rte_flow_item_integrity.value, but it seems we can just remove the struct member "value" which was unioned with some bitfields. > In any case I think this should be in a different thread then the above fix. I am OK to have such fix, it looks better to remove the union which leads to duplicate the API.