Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp2311731pxu; Sun, 13 Dec 2020 21:52:28 -0800 (PST) X-Google-Smtp-Source: ABdhPJwacH2WqzHRIRQLos1yRF/SrDtopRJTfm5bOjKmpJLnfAxWaEX1FMl46Bx1F/UTqYREEyV5 X-Received: by 2002:aa7:c603:: with SMTP id h3mr23439510edq.254.1607925147987; Sun, 13 Dec 2020 21:52:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607925147; cv=none; d=google.com; s=arc-20160816; b=04ti8QOb7A7L6giA+Sj28Ue3Al0s8rStdXK+L1viVF7d3rVHlZqrGnJQHAVofw9Dj3 nSdpcoJC7mhJCGvOGmaY1Ec6NTK3w5NFu5P+r+x8KEDCpB3+aibSp08EuSk3KS8m5mBu 7l8iJmVQcK/ZpIPzNhNz2TTX8jcZVrkUpsQ+ZKWB1vIcB9ZMpfMgwlTUd5LIvSJtHddu yo49dCK5fXZfEopvOLFv1G7BfhEMdm1sGOaiEUhm+qeIXdYI2+WdBGko4OJdI9PRWcmy vn/U93U8XYKYfM7CNIFj+vbmFn8acs0AsE43WZALBsUry7Y3qNILh0crO+T92VM7D/c+ WhNA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=4nHl9Ta719V89yV6QVnM35nM+V5GwRvNiDcRveMPHnU=; b=dFYm1OTuePAwWj6FDnOcUVnsdG96DYEJIk8CmxGCgGELQAv/Ig4gZPW6Ck7tCbd9Bj hCRRbwx22rfspJQc6xNKKx/QjX39pqo8VS9/utKV4qHwddADj+U9segk+SVCBhw+xTLL CYmi/jnChTcT4+xfCMOFcbHaYcKasDukwYUCr7wgN24eGay7ZbLQQKys8IFESPzntMdQ pYd4iIvyxxluAYZed+xGBUEWrm0cQMaX9piJzlsr+MEhmuS6rb9qpGXmu1xjA9tLwMKu YPLqEERCL02AFihyhtk1PH0Xo3fYM4R/FsazV6iDiLaoo5f/j/LLZ5B9Tt5SxgZbtLML JVXg== ARC-Authentication-Results: i=1; mx.google.com; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e8si9622180edq.377.2020.12.13.21.52.05; Sun, 13 Dec 2020 21:52:27 -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; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2407654AbgLLQh0 (ORCPT + 99 others); Sat, 12 Dec 2020 11:37:26 -0500 Received: from mail.kernel.org ([198.145.29.99]:57728 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2439380AbgLLQJg (ORCPT ); Sat, 12 Dec 2020 11:09:36 -0500 From: Sasha Levin Authentication-Results: mail.kernel.org; dkim=permerror (bad message/signature format) To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Sven Eckelmann , Jakub Kicinski , Sasha Levin , netdev@vger.kernel.org Subject: [PATCH AUTOSEL 5.9 14/23] vxlan: Copy needed_tailroom from lowerdev Date: Sat, 12 Dec 2020 11:07:55 -0500 Message-Id: <20201212160804.2334982-14-sashal@kernel.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20201212160804.2334982-1-sashal@kernel.org> References: <20201212160804.2334982-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore 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 85c4a6bfc7c06..94e14238fb8a1 100644 --- a/drivers/net/vxlan.c +++ b/drivers/net/vxlan.c @@ -3804,6 +3804,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