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 5F03CA0547; Sun, 18 Apr 2021 20:11:43 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DF63841108; Sun, 18 Apr 2021 20:11:42 +0200 (CEST) Received: from new2-smtp.messagingengine.com (new2-smtp.messagingengine.com [66.111.4.224]) by mails.dpdk.org (Postfix) with ESMTP id 749E9410D7 for ; Sun, 18 Apr 2021 20:11:41 +0200 (CEST) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailnew.nyi.internal (Postfix) with ESMTP id 1BF5E580838; Sun, 18 Apr 2021 14:11:41 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Sun, 18 Apr 2021 14:11:41 -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= yPHimF32JYkJBTndjFVpDbfw2PJNP/evKZUUJFs5IRs=; b=OsqPwPX5GAtCcD2v ljx3Y+xA78c0yUGnfEo+RWQpmSrbITq7bT3EFQUOFVMQ8yWTpoY+SPGjLKTwXR7f 3KpMBMY04yh40O9oCJedDl7U7Cssw6sBa9PvTwNfjxDgwjXdlwNh0AcjGGYlXpRt G++T0TG6ELKpIzRjK8MzVdiKrny9ogWK94lvGq/acZfp/BH0+XYZe6wXjvwExVG/ +zWI0dWRvyBFJtSGwN9nHYiGEtz01RrdDsMAto9xa9bmXAc0KvUKV88Y7PTklmMh lpBxTKMrMPvzOjoQXqgUtK43DKlvBxFBtuXyl5t5PeBYpZwca8TCa86IaUR/OUWS BeWVeg== 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=yPHimF32JYkJBTndjFVpDbfw2PJNP/evKZUUJFs5I Rs=; b=mHPxdnQD8ePdCUOObAsGGWoTS/qU2AAltMdSQOCtTTD0uDTOp4LTKrlL4 rbBpMoUq3pqINAfNScFcmmL08MRLobs4c5DVu3XWX8RIM6kHtNYuysd/F+bopg9Y EI7kx8J+yLEity95iFWDxBR89iDxfyilzVJa5BteenW5Hf6/P6JwjRVi1oo5oSCN IX5BaP3rhqY6Xft8mbAURIJ5PYP9jVGFcLO+aVEps6WWqJ1MdXlgBohJzPZkE9im +2RY2QXb8KYuil9lESUBfY1uaO+VB9z4razIOejSkMZrBPQdSa1i+zSxV0AMaRR1 XIT7pM+S2MavT/fSbbsuaPGnWaIHg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrvddtuddgfedtucetufdoteggodetrfdotf 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 id 124391080063; Sun, 18 Apr 2021 14:11:37 -0400 (EDT) From: Thomas Monjalon To: Gregory Etelson Cc: orika@nvidia.com, ajit.khaparde@broadcom.com, andrew.rybchenko@oktetlabs.ru, dev@dpdk.org, ferruh.yigit@intel.com, jerinj@marvell.com, jerinjacobk@gmail.com, olivier.matz@6wind.com, viacheslavo@nvidia.com, getelson@nvidia.com, matan@nvidia.com, rasland@nvidia.com Date: Sun, 18 Apr 2021 20:11:36 +0200 Message-ID: <1821559.2F0b4OcNhU@thomas> In-Reply-To: <20210418155136.23684-2-getelson@nvidia.com> References: <20210418155136.23684-1-getelson@nvidia.com> <20210418155136.23684-2-getelson@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v6 1/2] ethdev: add packet integrity checks 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" 18/04/2021 17:51, Gregory Etelson: > +__extension__ That still doesn't make sense, as in v5. The things which require a macro are anonymous union, anonymous struct and some bit fields with special sizes. > +struct rte_flow_item_integrity { > + /**< Tunnel encapsulation level the item should apply to. > + * @see rte_flow_action_rss > + */ > + uint32_t level; Should have RTE_STD_C11 here. > + union { Should have RTE_STD_C11 here. > + struct { > + /**< The packet is valid after passing all HW checks. */ > + uint64_t packet_ok:1; > + /**< L2 layer is valid after passing all HW checks. */ > + uint64_t l2_ok:1; > + /**< L3 layer is valid after passing all HW checks. */ > + uint64_t l3_ok:1; > + /**< L4 layer is valid after passing all HW checks. */ > + uint64_t l4_ok:1; > + /**< L2 layer CRC is valid. */ > + uint64_t l2_crc_ok:1; > + /**< IPv4 layer checksum is valid. */ > + uint64_t ipv4_csum_ok:1; > + /**< L4 layer checksum is valid. */ > + uint64_t l4_csum_ok:1; > + /**< The l3 length is smaller than the frame length. */ > + uint64_t l3_len_ok:1; > + uint64_t reserved:56; The reserved space looks useless since it is in an union. > + }; I'm not sure about the 64-bit bitfields. Maybe that's why you need __extension__. I feel 32 bits are enough. > + uint64_t value; > + }; > +};