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 9C866A04B1; Tue, 6 Oct 2020 00:55:27 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D9BEC11A4; Tue, 6 Oct 2020 00:55:25 +0200 (CEST) Received: from wout2-smtp.messagingengine.com (wout2-smtp.messagingengine.com [64.147.123.25]) by dpdk.org (Postfix) with ESMTP id 79B9E1023 for ; Tue, 6 Oct 2020 00:55:24 +0200 (CEST) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.west.internal (Postfix) with ESMTP id 38E049FB; Mon, 5 Oct 2020 18:55:22 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Mon, 05 Oct 2020 18:55:22 -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=fm2; bh= PVyXyi4ETQLGp5EbfRrO+SlIhh55qJzHngMoDiXsgVk=; b=nzG9C61div0OirBx am5WbDH3j5bTOGW/bHoIUSbOrMiwDnNf8rr+UokMAWclfkp0BBkiwjufUNmdtk1R AkiSpkKDDwVrF3lBt3hv8XDsQXh6SOGbsAS+793ii3rU6Po0gtOZA+WOJGe91Wpb F1soeKu1W0sSS2D08s4WVWPbPLMRxkunKW0zgohAEDuJxfF4fTSMKaETcb6/HFsr ueWJM1G3ni+YI7ItvpaHDLN+NmHKuiPykQ2t1VLiAAQGeuSbcwg9SWmRw7z0EcnV ubpLYEu3rW1vrmjVNNdc/LFEd4uA3q3RYmesXKwjUyt1gKUTPJtDpADbpXXL9Wph Ib4YPA== 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=fm1; bh=PVyXyi4ETQLGp5EbfRrO+SlIhh55qJzHngMoDiXsg Vk=; b=kTqN+z+jZKfMRGEKIRprHM+TFFq4NOgqO5Ca2BxU10uOe1isnpX+LcKse Wvzwc9oUEumOv+zU9PoK0hrbfINsQvmArKGtEZ1iGIFj5UUVQfM4iw6AJ8IAQNwA gvLDGsN60rOVRSCTnO8C697OwwtwWMBBlhkSpTx5oqGiaRK1hkobRPsFPGWQRnH9 Nh4WpGwGybz6SLCXHXAk7qO0aPT4nQ1ct4aXQiYHJXNoDFV3mu+KUBnQ5xuC0Ipu oaN9tKeB8nRPSxC5ph2HXmMrPZMDAqhxmQDsiSNDmGog26bm0bOhxEIWz+5imkBH JWRTb2Oh/eRQj6wg72lE9pJT0NQLw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrgeefgdduhecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhmrghs ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucggtf frrghtthgvrhhnpedugefgvdefudfftdefgeelgffhueekgfffhfeujedtteeutdejueei iedvffegheenucfkphepjeejrddufeegrddvtdefrddukeegnecuvehluhhsthgvrhfuih iivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgrlhho nhdrnhgvth 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 AB8D2306467D; Mon, 5 Oct 2020 18:55:20 -0400 (EDT) From: Thomas Monjalon To: Michael Pfeiffer Cc: Olivier Matz , Andrew Rybchenko , dev@dpdk.org Date: Tue, 06 Oct 2020 00:55:19 +0200 Message-ID: <7417467.3Ncg9TYYCI@thomas> In-Reply-To: <20200901094755.561661-1-michael.pfeiffer@tu-ilmenau.de> References: <20200821113210.307175-1-michael.pfeiffer@tu-ilmenau.de> <20200901094755.561661-1-michael.pfeiffer@tu-ilmenau.de> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v2] net: calculate checksums for packets with IPv4 options 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" > - cksum = rte_raw_cksum(ipv4_hdr, sizeof(struct rte_ipv4_hdr)); > + cksum = rte_raw_cksum(ipv4_hdr, (ipv4_hdr->version_ihl & 0xf) * 4); Truly naive questions: - doesn't it deserve a static inline function rte_ipv4_hdr_len()? - how generated code for "* 4" compares with "<< 2"?