Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3281761imm; Sun, 17 Jun 2018 15:56:09 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJBXTB31ZiD1YJZGIHHZs1eVTc9FSErUb/lMbdQ9og4OjyOij2/suXQmI1DYy5VN66cEaXi X-Received: by 2002:a63:6ac5:: with SMTP id f188-v6mr8897416pgc.195.1529276169556; Sun, 17 Jun 2018 15:56:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529276169; cv=none; d=google.com; s=arc-20160816; b=uD8P8JMgP2WUExIpKUT8cuIrhl6kvcDpGoQvbYeCeCLjFb6neYEr/Kf9HfAfIbPAjr mKHZKfxzGFQcB1Et9H87QGkqj3dzfwPGqkzyQs8B83tVS6z4qnx4D0kCgd5AhzsTwgZK YF78ahcXTVIFjEu0QzGnT/X2Y5V1433F9InvSWqlyLSfbXiHC36rdPiUwcH/KxnfqcDh roeSPh15ZCinMxJt3/iynP62vy4QJNuTX62LUDbJoEb5qyVUPZy+e/oSCoEiUOerMm9T rTVi/N5HQIWTL2k5y/WzjQfOl1Gww+0HYwEE60xnEkJ0BgkLK1goqdlTZPj5WHJqergN jxgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=lxETX4DhBQbKYLCrDPYmuMFE6cj3I8bZjDQzt70yHVA=; b=Cc072pjF87l5Ud+P9EARh/KT49Q6mMLVVLdymXO2aEaNgC2AXmI4MLGdTGzvj2Yzx8 h8KVGh3G01ZSDvSd4tC8wlx7z7pl3Ih1YXG2W254Z56dXEsOlEFvx1SMGvfjfJqUv4Ur A/NEPNC+UaFxChYni0in49ZTeDuutjMFoXqFFdBFOX5oPa4yTlDj6WHeQfPkFForG0vu Ojh/oeXp+n+29ukrta03Vu9nqv/4bKrn/6hsmbM2f/1MpXUH3MJyKkIOUl12ypqwbqUV P0ZnopD7UJLy2wUUVGQls50VYwcka/j98MvBKpsH+djLMrLoPP1msGkJz5tzjT4WLVNi kLRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=LTCu70ak; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 11-v6si6933306plb.195.2018.06.17.15.55.22; Sun, 17 Jun 2018 15:56:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=LTCu70ak; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754167AbeFQWyy (ORCPT + 99 others); Sun, 17 Jun 2018 18:54:54 -0400 Received: from mail-pf0-f193.google.com ([209.85.192.193]:46976 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752809AbeFQWyv (ORCPT ); Sun, 17 Jun 2018 18:54:51 -0400 Received: by mail-pf0-f193.google.com with SMTP id q1-v6so7212137pff.13; Sun, 17 Jun 2018 15:54:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=lxETX4DhBQbKYLCrDPYmuMFE6cj3I8bZjDQzt70yHVA=; b=LTCu70akI2I7Umnh0baiy8ipDZsWOXOMYeeQhEFmwPOqVE5Y7qj/G6Wmgn7ftEHQKz mDpP9O3zcMfDP4EOSiYrLVgkIiglMH89jYXa+F1gO+6yQAWzsiK7ebkII9zxWzhvF/Fq AFiN9HxT5wMfN0jzSDauPkZI7Gmi+kSjlJFT44yEm7OyLZ167JX/hl1npE0MFiSzd+88 7ntq+yhJIWjNPLkvogl4UkyzrZjUJPxBvOPToAsFQRHccMQgFJRgxPl6CkAFDfeI7Un8 7gLeJGQ2tw8c4LoWo+xsDhhPQgJbWvzGzbkiML4gdj9TOvK1hV3fX+xTewh6FCij+oaw RXsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=lxETX4DhBQbKYLCrDPYmuMFE6cj3I8bZjDQzt70yHVA=; b=E2yPcEancVhjsFES8QWVqePt6/sluCRe1FepAKr1tR3ueVbsRvBgquMvKE/Ckgh/8O 76xPJ8pqCaZsL+/7Su6U8PsxPY1uVl+1kCp9X3lLyFAMSEewF4C6WAKsX7JRu81YIBlC Xdczn0qVThIv/niRJw0sfSlCN/B8rkB1vaI5CMIBgDzif968PRDegYFuI2ZhR73g0ehn 4it2WjQntNptQ/XRezbxOTgMi02eQGmYOCdJDEgDr5N/XWnElvXUaKeErBTgwkYULCGm n6gIDyqIYKNfK4s/Y6T6jAB1LKrZ1vw9kjctSNxNByPCIeWzUVqK6y3BqGvO5kZTydey AWgw== X-Gm-Message-State: APt69E13RKTX/mX1qJtvDt30/KBxzv+FxSyyPYhMDbQFTRxUqxgIMjbe 17mC+e/tuX27NVG64R9HSpRQCZdY X-Received: by 2002:a62:484d:: with SMTP id v74-v6mr11136702pfa.256.1529276090800; Sun, 17 Jun 2018 15:54:50 -0700 (PDT) Received: from [192.168.86.235] (c-67-180-167-114.hsd1.ca.comcast.net. [67.180.167.114]) by smtp.gmail.com with ESMTPSA id e1-v6sm16280707pgt.71.2018.06.17.15.54.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 17 Jun 2018 15:54:49 -0700 (PDT) Subject: Re: [PATCH] Revert "net: pskb_trim_rcsum() and CHECKSUM_COMPLETE are friends" To: Andreas Schwab Cc: Mathieu Malaterre , "David S. Miller" , Eric Dumazet , LKML , Christophe LEROY , Meelis Roos , netdev@vger.kernel.org, linuxppc-dev References: <20180615185645.8921-1-malat@debian.org> <9d88677a-f2be-2089-79df-15df4e9a5dd6@gmail.com> From: Eric Dumazet Message-ID: Date: Sun, 17 Jun 2018 15:54:48 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/17/2018 03:27 AM, Andreas Schwab wrote: > > That doesn't change anything. OK, thanks ! Oh this is silly, please try : diff --git a/net/core/skbuff.c b/net/core/skbuff.c index c642304f178ce0a4e1358d59e45032a39f76fb3f..54dd9c18ecad817812898d6f335e1794a07dabbe 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c @@ -1845,10 +1845,9 @@ EXPORT_SYMBOL(___pskb_trim); int pskb_trim_rcsum_slow(struct sk_buff *skb, unsigned int len) { if (skb->ip_summed == CHECKSUM_COMPLETE) { - int delta = skb->len - len; + __wsum csumdiff = skb_checksum(skb, len, skb->len - len, 0); - skb->csum = csum_sub(skb->csum, - skb_checksum(skb, len, delta, 0)); + skb->csum = csum_block_sub(skb->csum, csumdiff, len); } return __pskb_trim(skb, len); }