Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9042503pxu; Mon, 28 Dec 2020 05:13:38 -0800 (PST) X-Google-Smtp-Source: ABdhPJyl0gMiR6caiGxk0E4UHFuFXUK/HHofEvwrKh1/Lxu5aOdj497jyzcIBVK+1vgdI5Vz0XsY X-Received: by 2002:a17:907:da7:: with SMTP id go39mr42945051ejc.58.1609161217857; Mon, 28 Dec 2020 05:13:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609161217; cv=none; d=google.com; s=arc-20160816; b=Qs4DAjsFWpic8bYaL+9yaYW4Vdv2ChSnVN5GwOLQlds+eDfF9hpiyZMgQuXTmXhy5X /SS/VfdEAMi/zxPXPGH9//KW49B2RO+d88WwFtCBDd7yuoyPJTDgp8VxS9QJT7X+ED2N KJRBElSq6ALZtO1VP6ewPs2EibuNRm+kYUB/hNZ+m8qz559KFAX8ucic/X3uSAtgrxMz aBbKWl/wSnsA7MvS8XaaMrrGBEOr2+pFIIulJ7VZ3lWJXJvi38tlUVVaeb+DKImaS9WU AeZP6mLT9kdDXhQJOZGHD4OPeAvA10ncSlxHh27x4SnWFCnaC3NC3SqWVcq5Fo7v8v3H r2oQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=fxOsSCbDjjjmOSQJrmFNY5AVrhgIa27hTP47s243QxE=; b=TQZFleLSvR0RxSTBBXzr/ourMM2iXAzTZO+JCw04ehVdMuXXw/KbE8IZZyV8PU9jfb EuF9DwsHtYT8iK7CFgJTDrwsMfB27bhv09CcUnQFWEpo21mMmbjqz7KeXu+CRBpUwdUw JrHfAbj5kVo+zT62QCSYVVCIuU2moFQ87zKVtqhTM2BQ26IkQtdqLj2GMOtoke2s7n1C aBoQo1iXZxceOXE0IAnpRI7KDdWoYG5W2hJQpvQI/lN1jL5yujIMwFiwwu3pOXC36J1z I7NbLl0DrFrZKYZsym0tqG7RGgEU2Zj2i1yKB0EYP4nOC5UEk3IVQQoEU2g0Te2l168O ivGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=zqXB0Vzh; 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=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gl19si18495698ejb.476.2020.12.28.05.13.14; Mon, 28 Dec 2020 05:13:37 -0800 (PST) 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=@linuxfoundation.org header.s=korg header.b=zqXB0Vzh; 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=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731830AbgL1NLm (ORCPT + 99 others); Mon, 28 Dec 2020 08:11:42 -0500 Received: from mail.kernel.org ([198.145.29.99]:39060 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731552AbgL1NLI (ORCPT ); Mon, 28 Dec 2020 08:11:08 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 3F2DE206ED; Mon, 28 Dec 2020 13:10:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609161027; bh=ldrXQ9oTcDqf9SYxNtJmPisupfTA8g1oDRT7fgObFBU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zqXB0Vzh5t9AOgkHmr6wHEn5jt3Gf2Wd1pb2RIlYqa1ZlCEXt2RJlp8/qx3AvOMJO NWCrly5+SNNjfzN9DNcJ43CDQs/wP0pULcT24fzzFLmX27UW1Mlrr447LwZR/18riC a5IMF9mxB6WBbBvWymU2mgnFgDXbdE1iVnv/HX7U= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sven Eckelmann , Jakub Kicinski , Sasha Levin Subject: [PATCH 4.14 045/242] vxlan: Copy needed_tailroom from lowerdev Date: Mon, 28 Dec 2020 13:47:30 +0100 Message-Id: <20201228124906.896981188@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228124904.654293249@linuxfoundation.org> References: <20201228124904.654293249@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Sven Eckelmann [ Upstream commit a5e74021e84bb5eadf760aaf2c583304f02269be ] While vxlan doesn't need any extra tailroom, the lowerdev might need it. In that case, copy it over to reduce the chance for additional (re)allocations in the transmit path. Signed-off-by: Sven Eckelmann Link: https://lore.kernel.org/r/20201126125247.1047977-2-sven@narfation.org Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/vxlan.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c index c21f28840f05b..94a9add2fc878 100644 --- a/drivers/net/vxlan.c +++ b/drivers/net/vxlan.c @@ -3186,6 +3186,8 @@ static void vxlan_config_apply(struct net_device *dev, needed_headroom = lowerdev->hard_header_len; needed_headroom += lowerdev->needed_headroom; + dev->needed_tailroom = lowerdev->needed_tailroom; + max_mtu = lowerdev->mtu - (use_ipv6 ? VXLAN6_HEADROOM : VXLAN_HEADROOM); if (max_mtu < ETH_MIN_MTU) -- 2.27.0