Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp1243015pxb; Sun, 22 Aug 2021 10:15:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzSVgWx8dnby3ub6ANtiAptR9NuhOcsLiHv43UTir3RtFqfK9drei5nWnVaotPYNLNrkIaE X-Received: by 2002:a17:906:2ac1:: with SMTP id m1mr32196074eje.518.1629652524658; Sun, 22 Aug 2021 10:15:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629652524; cv=none; d=google.com; s=arc-20160816; b=ltTVHhMPe1Hu2+GpxG9z1G7cOXaiTFZ24lFQthP9FB77GeRRcNNDsQLMMaGEtWey6I PRe48Adzr9VdZkEiNIG37/SKtMHET5BfHLk7dA4FW1LJkkwOeQikoYVbDIzem2lV/rW3 toSJ7H8608cWsrRXeS5PmoP4nYHsg9d6eBI0BcYhnuP2ogCxKvcSQacjUdU76jDRqjB+ YkBZ7Am9ejra+gnxQ0m8wB4iF4H9fYSgW6RSkA9vWd78C2ZWxVMdLSmRy48Le6mtWpHz YA5NklejuLsh6B3rNjvxWWODF+UP6Sp3ZZTYTE3r9k73uIvKvpZTlGtth5oFikXvyFKt NPDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=0fmNxroS5SpgAIXhN5w/j2vi67JXUEs6Ajnwb8jCbzo=; b=CPLKZIgEvXpdxz2MU8/Lp8zWCxppTNZd4gl8eM1Mj2AS/i/KqX83psYenYmy3/YEQA y/oQIwtzRrSp74ozAurZK3N1zmbeZanyjXkm96mIRODjvizBuvGkVFdilu+Oo7QNZZRY uSPs7mSicJZNpVQEKQvoHxOZEcgfSteWzktJczw1zIIBVKgOZmxzce5UnG5iv9YH0My0 Z+vGFpoUP+ZGTtQElECEdcLoLj12EYqb2DIiR2NJE+PX+ufPTGEiywBbikaHJKGPYeZT +0axKsTOgq/jMnCTWx+H/ez1vbu6SgKCHqK+zpQO9Rb4QYnqYRk4W943VD3r+bas1tih XHZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=SqYFubdN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id k5si12486276edi.147.2021.08.22.10.15.01; Sun, 22 Aug 2021 10:15:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=SqYFubdN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S231176AbhHVRO1 (ORCPT + 99 others); Sun, 22 Aug 2021 13:14:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54028 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229586AbhHVRO0 (ORCPT ); Sun, 22 Aug 2021 13:14:26 -0400 Received: from mail-ej1-x62b.google.com (mail-ej1-x62b.google.com [IPv6:2a00:1450:4864:20::62b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 48D67C061575; Sun, 22 Aug 2021 10:13:45 -0700 (PDT) Received: by mail-ej1-x62b.google.com with SMTP id a25so5044789ejv.6; Sun, 22 Aug 2021 10:13:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=0fmNxroS5SpgAIXhN5w/j2vi67JXUEs6Ajnwb8jCbzo=; b=SqYFubdNy8QBGBHenNDL8htKljeVcnImXNjFXwM9DfYKuYq9iYZNMswbUN0Ueb1PiT 9GeYhl02lF8CvK3HXkBGNFKuvrbr6dtRnY4KDIslThrEp86eHWJVVaNxDxYISsJ8IQ3t htotdE+bdiCvvO0IXDg3qBQ6pjThkSGSe8lanZrpXS8C0zSwCPttfx4Rdg/tY1D4RCeO ZnR+QcRBz9UDGNqbYh+DmrplghlnornM+69Aucp2QvK24DTfYyxIeY438z2HwAx2S3Y8 BUqYaiHdvDrHdVhqwEs+X4PrjC/ELByYa5P3WBDvFSlZtdhMi2KXWZAg9ktoEtmxDQvC jqdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=0fmNxroS5SpgAIXhN5w/j2vi67JXUEs6Ajnwb8jCbzo=; b=mKnoMYN1WWSkyxKRA4Xo/K5AFZvWCz3MqRivc2vwjDkgatw4oKI728GJWqat832Gt4 U42utttaSAhxunHECES12AHlQs9hBvizY3vqniktcoGkuoDj8VdsXpFRZ7A1Ks4SfdEw JusCuHwLD3jzX4zRWW5zkBDPZ5JW2UhIoW0tnZUVLc3axXA055LcROA0srNFdz7k1Fh+ 3dpLUD0SnHe8RH22np+kJo1D4JSApB47PV9OflZHAjVoMFmbw2841qH5cnBYg9BiSEPX EpX3D3IXE6t3enWiz/9W5stm0rl0Qal/ipH1VzexBqqmbbCIXApwYgtfTj99PRKKRZ6o vvaw== X-Gm-Message-State: AOAM530g83A86/tM/Lg+Ff3JIbIHKgFDoXtwsimYWSH3DPbfm3vRlhfs XaepZT+uMklQWiMjySUE+itAm1I260MHp0vG73E= X-Received: by 2002:a17:906:720e:: with SMTP id m14mr31417254ejk.500.1629652423852; Sun, 22 Aug 2021 10:13:43 -0700 (PDT) MIME-Version: 1.0 References: <77f3e358-c75e-b0bf-ca87-6f8297f5593c@virtuozzo.com> In-Reply-To: From: Christoph Paasch Date: Sun, 22 Aug 2021 10:13:32 -0700 Message-ID: Subject: Re: [PATCH NET v4 3/7] ipv6: use skb_expand_head in ip6_xmit To: Vasily Averin Cc: "David S. Miller" , Hideaki YOSHIFUJI , David Ahern , Jakub Kicinski , Eric Dumazet , netdev , LKML , kernel@openvz.org, Julian Wiedmann Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Aug 22, 2021 at 10:04 AM Christoph Paasch wrote: > > Hello Vasily, > > On Fri, Aug 20, 2021 at 11:21 PM Vasily Averin wrote: > > > > On 8/21/21 1:44 AM, Christoph Paasch wrote: > > > (resend without html - thanks gmail web-interface...) > > > On Fri, Aug 20, 2021 at 3:41 PM Christoph Paasch > > >> AFAICS, this is because pskb_expand_head (called from > > >> skb_expand_head) is not adjusting skb->truesize when skb->sk is set > > >> (which I guess is the case in this particular scenario). I'm not > > >> sure what the proper fix would be though... > > > > Could you please elaborate? > > it seems to me skb_realloc_headroom used before my patch called pskb_expand_head() too > > and did not adjusted skb->truesize too. Am I missed something perhaps? > > > > The only difference in my patch is that skb_clone can be not called, > > though I do not understand how this can affect skb->truesize. > > I *believe* that the difference is that after skb_clone() skb->sk is > NULL and thus truesize will be adjusted. > > I will try to confirm that with some more debugging. Yes indeed. Before your patch: [ 19.154039] ip6_xmit before realloc truesize 4864 sk? 000000002ccd6868 [ 19.155230] ip6_xmit after realloc truesize 5376 sk? 0000000000000000 skb->sk is not set and thus truesize will be adjusted. With your change: [ 15.092933] ip6_xmit before realloc truesize 4864 sk? 00000000072930fd [ 15.094131] ip6_xmit after realloc truesize 4864 sk? 00000000072930fd skb->sk is set and thus truesize is not adjusted. Christoph > > > Christoph > > > > > Thank you, > > Vasily Averin