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=-2.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED 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 77320C4320A for ; Sun, 22 Aug 2021 17:13:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5927C61266 for ; Sun, 22 Aug 2021 17:13:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231515AbhHVRO2 (ORCPT ); Sun, 22 Aug 2021 13:14:28 -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-Google-Smtp-Source: ABdhPJwg3J4bTj6c7O9lehMPZo11j1wXhHP3L/sNexMay3wHrut3RXYWHdh7gyx4ag9XeveGHWo78F94tF01aqECTOU= 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