From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.9 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 01BBFC4363A for ; Mon, 5 Oct 2020 22:55:29 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id 4981C2074F for ; Mon, 5 Oct 2020 22:55:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4981C2074F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=monjalon.net Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org 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"?