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 65DC541CEC; Mon, 20 Feb 2023 14:49:30 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2077B4304D; Mon, 20 Feb 2023 14:49:30 +0100 (CET) Received: from wout3-smtp.messagingengine.com (wout3-smtp.messagingengine.com [64.147.123.19]) by mails.dpdk.org (Postfix) with ESMTP id 3C30D4304C for ; Mon, 20 Feb 2023 14:49:28 +0100 (CET) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id D897B320091F; Mon, 20 Feb 2023 08:49:26 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Mon, 20 Feb 2023 08:49:27 -0500 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=fm1; t=1676900966; x= 1676987366; bh=5/zDisWuoEqV0N9ExwY3Z1JbbcFVSgIzIA/eCAeiESU=; b=H OC+e5nsp78d+vEQU/JOt9zysqcMvwYO4NE+5vQSHwJIhQ8Ibmfv7UEFbE441J4Zw bk8nmxLpUuvJMiK4RyOcCIZiwqFFJdEYPDk699O8Mt309wE5RgXkbN0b2YkHU2ub 4xsxaGY8r2UydR+jWJkIWogEtxvshqOoasO6/hFleKW5RyrqW0punlDnuiXKZd9x o/6SDw/C7J3ONE9yUCiFTcgsVMnQK/iog4UeLGdycRWsCd/ZCCX89pJrwzI/UNBh KDBVz9hnMYRLnrehZETutKNRlbrp5ifu8OSgdXZoc07uf2uknF7Y0M4boE6o+1EI HbTvY3wMEQCoV9HZG7W3w== 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=fm1; t=1676900966; x= 1676987366; bh=5/zDisWuoEqV0N9ExwY3Z1JbbcFVSgIzIA/eCAeiESU=; b=g D3cggK3sUnzWEK5+pqX5g85bVNYbwZX3T+A2m1LKoDbFxPv92x4bRruLSC+XXNxK Mrhqa8DEY//M4FBkiZT854XwJ1Krb2dkcXu1PfV1kZVYMdT37AtAJrlb1s1IKPaW WjvoErZ8ftMGOMwa3HHqQN9o1cNHoomzw2o+qh7G1Ljv9XXG1yT9dYLKZBuLC5IO fTpL3bfPhA7by19Ss92C0gLB8uAEa/U1mIRSZCWZGB4V8JvF9PuseE3tZ6j2tdJ/ fo9zAHNocBae8QPGnWthvrq5MFfC0I55AFC92SkhaBfJuKfnbv3aO/nHqpqAtROK +fbX7z/ycyXHRZye7kD/g== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrudejhedghedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhm rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc ggtffrrghtthgvrhhnpedtjeeiieefhedtfffgvdelteeufeefheeujefgueetfedttdei kefgkeduhedtgfenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 20 Feb 2023 08:49:25 -0500 (EST) From: Thomas Monjalon To: yipeng1.wang@intel.com, Bili Dong , Sameh Gobriel , Bruce Richardson Cc: dev@dpdk.org, cristian.dumitrescu@intel.com Subject: Re: [PATCH v3] hash: add XOR32 hash function Date: Mon, 20 Feb 2023 14:49:23 +0100 Message-ID: <3296424.9LS3J3VOpE@thomas> In-Reply-To: <20230215110630.3885175-1-qobilidop@gmail.com> References: <20230215105442.3878441-1-qobilidop@gmail.com> <20230215110630.3885175-1-qobilidop@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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 15/02/2023 12:06, Bili Dong: > An XOR32 hash is needed in the Software Switch (SWX) Pipeline for its > use case in P4. We implement it in this patch so it could be easily > registered in the pipeline later. > > Signed-off-by: Bili Dong > --- > +/** > + * Calculate XOR32 hash on user-supplied byte array. > + * > + * @param data > + * Data to perform hash on. > + * @param data_len > + * How many bytes to use to calculate hash value. > + * @param init_val > + * Value to initialise hash generator. > + * @return > + * 32bit calculated hash value. > + */ > +static inline uint32_t > +rte_hash_xor(const void *data, uint32_t data_len, uint32_t init_val) Should we add "32" in the function name?