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=-5.1 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,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 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 AB99EC2D0A3 for ; Wed, 4 Nov 2020 19:30:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3E5842065D for ; Wed, 4 Nov 2020 19:30:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="sKUP9T/V" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730749AbgKDTaZ (ORCPT ); Wed, 4 Nov 2020 14:30:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36532 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725889AbgKDTaY (ORCPT ); Wed, 4 Nov 2020 14:30:24 -0500 Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 76D37C0613D3 for ; Wed, 4 Nov 2020 11:30:24 -0800 (PST) Received: by mail-ed1-x52d.google.com with SMTP id b9so13468046edu.10 for ; Wed, 04 Nov 2020 11:30:24 -0800 (PST) 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=QQyPadoUOHYBOoA5+l0Qrj97nqWwN8g6Qn0Ly8GOILk=; b=sKUP9T/VP1HDyxmJMLmeedQceCZ+UirBA7rRDhDU9jwg+PGFAKXSQQLEQJaDgFImTw SHflBh6ALFo5ibgx5gVz0CmUTv6Fw5u668+8FxLfos8F09tCqqAsdFVIbmzyfgoKGPRi 4vRqAnGuNRAELs0QFo5QNZCPA+mmOmj+pltr4c0LNlm+freczQTOa3qI2k83+dIR+UwO Quo6wpVynvRdO4/5UYfKLAvpGmyJgjd3c1pqcPOkcA7BPtwJIaEuKqRECWdWrezmKv7C 5++r5u8GGc1uDfy7ONUax9NjnwGT/oJD0tPbtWljTD1EsHJAx5cRal02eNMYSOwkg9Cp 6wzg== 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=QQyPadoUOHYBOoA5+l0Qrj97nqWwN8g6Qn0Ly8GOILk=; b=oUlT/t+3CbDiHlxO6q9ss5YLffZwp4eYuAvtNnV83HU+lDACH6JKXxEp2+ePkLScmI kNhqOBW8qjUdCjfdIj1Amsk5CBc21w1K2YqmptQ3JTs5J5XOStrY2qaGdTGo9eYKqqZO qP7Ma5py8OS+yqFrk8oGccuUnfYzbsUJynUE0ckwoetvNKce8F8yQ9mpcCSyO4LEuHj5 pryBCbHLJJegTW7UaRP7PFqoXjjVW4cfo8fI29usDfvl0vm2mVR2QMzr+CvsR22yNxhD M2EwVqADZy6/SCLH7Jzp32Q+Pez6r1raaBw4BCDl9Quk0bs8DtVZthe3Fug7SnDWu0Pq 4pLQ== X-Gm-Message-State: AOAM530Ogfjs6cryVvykKhvVWrzfQ/gap+JInSku3psR/paaE870HRt7 tZva8zn+Tslifs3kJZgtItU= X-Google-Smtp-Source: ABdhPJzJeJg5G08oNTmWbeLyhn052UMiUZ7x+uLPy8kAODYPc8llwtUG/O/dB2biolTQF10wfNgvkw== X-Received: by 2002:a05:6402:1112:: with SMTP id u18mr29254635edv.349.1604518223047; Wed, 04 Nov 2020 11:30:23 -0800 (PST) Received: from ?IPv6:2a0f:6480:3:1:6c3b:b371:86f7:b3f1? ([2a0f:6480:3:1:6c3b:b371:86f7:b3f1]) by smtp.gmail.com with ESMTPSA id z14sm1454847ejl.110.2020.11.04.11.30.21 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 04 Nov 2020 11:30:22 -0800 (PST) Subject: Re: [PATCH] IPv6: Set SIT tunnel hard_header_len to zero To: Willem de Bruijn Cc: Network Development , David Miller , Alexey Kuznetsov , Hideaki YOSHIFUJI , Jakub Kicinski References: <20201103104133.GA1573211@tws> From: Oliver Herms Message-ID: Date: Wed, 4 Nov 2020 20:30:20 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On 03.11.20 19:42, Willem de Bruijn wrote: > Thanks. Yes, this is long overdue. > > The hard_header_len issue was also recently discussed in the context > of GRE in commit fdafed459998 ("ip_gre: set dev->hard_header_len and > dev->needed_headroom properly"). > > Question is whether we should reserve room in needed_headroom instead. > AFAIK this existing update logic in ip6_tnl_xmit is sufficient > > " > /* Calculate max headroom for all the headers and adjust > * needed_headroom if necessary. > */ > max_headroom = LL_RESERVED_SPACE(dst->dev) + sizeof(struct ipv6hdr) > + dst->header_len + t->hlen; > if (max_headroom > dev->needed_headroom) > dev->needed_headroom = max_headroom; > "I think that's enough. At least it definitely works in my test and prod environment. Would be good to get another opinion on this though. >> Fixes: c54419321455 ("GRE: Refactor GRE tunneling code.") > > How did you arrive at this SHA1? I think the legacy usage of hard_header_len in ipv6/sit.c was overseen in c54419321455. Please correct me if I'm wrong.