From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 83993A0350; Wed, 24 Jun 2020 14:22:09 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3788F1D8D8; Wed, 24 Jun 2020 14:22:08 +0200 (CEST) Received: from wnew2-smtp.messagingengine.com (wnew2-smtp.messagingengine.com [64.147.123.27]) by dpdk.org (Postfix) with ESMTP id 2CDC11D732; Wed, 24 Jun 2020 14:22:06 +0200 (CEST) Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailnew.west.internal (Postfix) with ESMTP id 356B682C; Wed, 24 Jun 2020 08:22:03 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Wed, 24 Jun 2020 08:22:04 -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= zxR0cq39N4F4WjlrY56dv5SHYGBMh+UwiBB8F25UZ+c=; b=DU9M6ZAItqg41pV5 GcSP5xrIyQccIn65cNwio4R8WJ0cl9AdlXjqdgqwFm3grxlbShcqSH8+oC2MzZCj 1urONUglqJ9LWEuBMSYzTqUmoiZpLanKPoop+MR5ybKDAKXsiBKr+uTrdcbxZmr9 U872/MN7/o6eslTLsZnyrDxlqhzOw1SPd6AHcMaSda/xaWwPs473Vq17z3HJWPMX zKyMn+jgCkePAqDAwkVYR6yOAzULiYxKvFZQ8K8uY/aBWWoNq2cZwJhZ5sbx4nnF gPLQLf+d8NfiPl00TH4hIsuK8QxrrmS6BN2QoHfnLF090m0llhoN1u8J7j9zPxvU w4+GbA== 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=fm3; bh=zxR0cq39N4F4WjlrY56dv5SHYGBMh+UwiBB8F25UZ +c=; b=qaF4nx3UASjct1FnSV4cyNZVgTRBp7IKdyVkbXLXYRpwt2iu80+RPckJd kCt31Yzga5ZfzwnJz3z8BgegvZpNC2WgnoS00dpZQRATzC8HOjOy2OVj3lsQtn6k Tfz4iEDKWbqcM1oUDL7vq1wWoszl230FOiB0xE/DMKMzwFh6qxMB81Nq4fpPv3DS cY+FRs0+cVvb6ibroR3GwSmplLVGzrDFWtLktt+7TFtcZTTFes487PHSSBwcsqtz tZS9toMSr4eH/hRcMwfAc+T1N8xzDq9ICMYoRlt5XluLCNTTLqwoiwwUkRYYVcz0 /gA1qtmf5cG3YbseuFuNALsj+qXQQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrudekjedggeehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkjghfggfgtgesthfure dttddtvdenucfhrhhomhepvfhhohhmrghsucfoohhnjhgrlhhonhcuoehthhhomhgrshes mhhonhhjrghlohhnrdhnvghtqeenucggtffrrghtthgvrhhnpedugefgvdefudfftdefge elgffhueekgfffhfeujedtteeutdejueeiiedvffegheenucfkphepjeejrddufeegrddv tdefrddukeegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvth 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 4F32F3280059; Wed, 24 Jun 2020 08:22:00 -0400 (EDT) From: Thomas Monjalon To: guohongzhi1@huawei.com Cc: dev@dpdk.org, stable@dpdk.org, olivier.matz@6wind.com, mb@smartsharesystems.com, konstantin.ananyev@intel.com, jiayu.hu@intel.com, ferruh.yigit@intel.com, nicolas.chautru@intel.com, cristian.dumitrescu@intel.com, zhoujingbin@huawei.com, chenchanghu@huawei.com, jerry.lilijun@huawei.com, haifeng.lin@huawei.com Date: Wed, 24 Jun 2020 14:21:59 +0200 Message-ID: <2108086.oFbrkSXBjQ@thomas> In-Reply-To: <20200527134009.19444-1-guohongzhi1@huawei.com> References: <20200527134009.19444-1-guohongzhi1@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [dpdk-stable] [PATCH] bugfix: rte_raw_checksum X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" 27/05/2020 15:40, guohongzhi: > From: Hongzhi Guo > > __rte_raw_cksum should consider Big Endian. We need to explain the logic in the commit log. > Signed-off-by: Hongzhi Guo > --- > +#if (RTE_BYTE_ORDER == RTE_BIG_ENDIAN) > + sum += *((const uint8_t *)u16_buf) << 8; > +#else > sum += *((const uint8_t *)u16_buf); > +#endif *((const uint8_t *)u16_buf) should be an uint8_t. What is the expected behaviour of shifting 8 bits of a byte?