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 B9CB7A04BB; Tue, 6 Oct 2020 17:14:15 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id BE17A1B870; Tue, 6 Oct 2020 17:10:35 +0200 (CEST) Received: from wout2-smtp.messagingengine.com (wout2-smtp.messagingengine.com [64.147.123.25]) by dpdk.org (Postfix) with ESMTP id 42BB51B850 for ; Tue, 6 Oct 2020 17:10:34 +0200 (CEST) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.west.internal (Postfix) with ESMTP id CDF1F103B; Tue, 6 Oct 2020 11:10:31 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Tue, 06 Oct 2020 11:10:32 -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= +FuWjZRjfWpmeuftPR0eyOBFvjBB0gbsl0HgbfLBbRE=; b=CY61QcQ0lljbk1xI f4qYTv8Q9eSaKqhust7GwLb4Oej0Zjg+fifB7j7N1rJ8vjLoCRjeJscVPCa3jM7d dBxc0k9VHdP2wM0q4qnAysAYf5pK9wm9B60YAmSgzZFtDf/NzKe0n7pcODPDWCCo UuuAkQB7PV4uvDZ7iohPpgoM4xmTy+MZypeXxFrgUTZdXYome9H86JkyJEDGWaDs kf9723fzrbwiJEPKAqbB2grvm9xL7Ed7b16ZYY6CIh/wLi7ySV7fnnWuhRt/aHGx Az3GwFwwsBmJuEi02dvPnqx94//EIh+4H/gBykduzIvScwQ46fogrNy+x+0NC7LE Rp694w== 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=+FuWjZRjfWpmeuftPR0eyOBFvjBB0gbsl0HgbfLBb RE=; b=VbfavBd1dcWKbCNyvrRKOVGpEuwp6rL1rdvASLOeYY8Sl+nZpEX6giJNm qcRFKK4/YSJozK1RQEstr0ObGpHCjbzslQCd9BdttpNJdNiL6lNLMbsc47imnxUz RWAVbqaDjR79rLCrWf2/wNIZzRAAfd8zxisM3cG8gr2HD4XxqQrk2lDakVzW5o7b SY40JCExOxK4apKd5ARv6REPCT/aoQTfiPQpBrpfy61yOxy/HNnPAThloeI/PaBh GDAxR558Ccx6HykqnHUr5wUE2lqbFY0wamSIGcpayTP2poxNSB7pMbtWrwXFHKuH 0NBi2A68poSb2oKL0wTMYrHorxM5w== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrgeeggdekgecutefuodetggdotefrodftvf 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 F17E73280068; Tue, 6 Oct 2020 11:10:29 -0400 (EDT) From: Thomas Monjalon To: Michael Pfeiffer Cc: Stephen Hemminger , Andrew Rybchenko , dev@dpdk.org, Olivier Matz Date: Tue, 06 Oct 2020 17:10:27 +0200 Message-ID: <2929781.z7AZqUM8vx@thomas> In-Reply-To: <20201006081013.GE21395@platinum> References: <20200821113210.307175-1-michael.pfeiffer@tu-ilmenau.de> <20201005193945.19aebfb5@hermes.local> <20201006081013.GE21395@platinum> 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" 06/10/2020 10:10, Olivier Matz: > On Mon, Oct 05, 2020 at 07:39:45PM -0700, Stephen Hemminger wrote: > > On Tue, 06 Oct 2020 00:55:19 +0200 > > Thomas Monjalon wrote: > > > > > > On 9/1/20 12:47 PM, Michael Pfeiffer wrote: > > > > Currently, rte_ipv4_cksum() and rte_ipv4_udptcp_cksum() assume all IPv4 > > > > headers have sizeof(struct rte_ipv4_hdr) bytes. This is not true for > > > > those (rare) packets with IPv4 options. Thus, both IPv4 and TCP/UDP > > > > checksums are calculated wrong. > > > > > > > > This patch fixes the issue by using the actual IPv4 header length from > > > > the packet's IHL field. > > > > > > > > Signed-off-by: Michael Pfeiffer > > Acked-by: Olivier Matz Applied, thanks > > > - doesn't it deserve a static inline function rte_ipv4_hdr_len()? > > > > Makes sense to have that. > > +1 > > However it could be in another patch: there are ~15 places where it > could be replaced in dpdk. OK thanks for working on the improvement.