From nobody Mon Sep 28 23:55:53 2026 Received: from mail-wr2-f1.google.com (mail-wr2-f1.google.com [74.125.225.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0CDDD2E413 for ; Sat, 15 Aug 2026 00:19:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.225.65 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786753189; cv=none; b=tj3N37ZtcbDxhCQ3QMfb8C+yXNvRZ+Bmt0bI7ggd79ii/cO16T7TxHkHtti2doQJQlVmotp/NUzZor/3TC9+fWSG+MSYsxq7sJs9/HvuleXgPiYLDyjFwSG7Wi10syiBzluwYacM4+wjvlxxTxbn7SYYP1IisUXFeU893QtSluo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786753189; c=relaxed/simple; bh=l5/rNrEDt25wZjSYD0pdYsmPtVIz8KgPZOALlUh8zJE=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=mzUJZeQOn9/6MY1H/sX9fr0o07cgKrCqUDwBC6Li9bbMsstibb1iQdYEFvuS1mFh5zlkyJjE6h0lgpUAwVhVOvKUrXkiud/AH6npT9MAL+ifxW4xTDyNIqxBAFFCP9ub70XQh0ble+tPS18tiXnY5iSXRzvR2Bdv9NFwtmDOZWI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ovn.org; spf=pass smtp.mailfrom=gmail.com; arc=none smtp.client-ip=74.125.225.65 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ovn.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wr2-f1.google.com with SMTP id ffacd0b85a97d-47f9c6bc99eso321592f8f.0 for ; Fri, 14 Aug 2026 17:19:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786753186; x=1787357986; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=M7IMe4hja9o/pB0bltn5i8OvJ0zh8ZQVJDZUWcTaB8E=; b=FqVjdme7zO2WN8QWhLZOtIM/q61Peks/fl9EgXNobtlJYSLkdREO0Dou4p9Yd3rO1P G9GQtQOYD30lHX68hGQhLQspevUowA7ZCkS1kbbSYG6IInh5PND6qmBOTPDEaeEDequb b8OjoFCBawvtbCyFyadaR3upPgLWAfNk94+vPuqh+FlyWpoJ5l6MhrU/CB0sghxlDdCX HMUv1bXHNj/Ou6YkLfX3i5OinXrVtLAxmjgzicsvHfNJlZlYcO65y9mOnan29F//DMhh lMAY7UK4Whk6+9w9gvhX2P3WuIMxuDBvDRblebysQJRovusFU4448hIfz2KyoJ0VM4hP YcZg== X-Forwarded-Encrypted: i=1; AHgh+RrWBStqEMdhwOn5jCSaPx3d9AH53HCoqx2p+4m1G2rGa0SFepwlMnFSWNIdLNiNXuamkGgVIccm0eymaSk=@vger.kernel.org X-Gm-Message-State: AOJu0YzIccFb1PHIZjcVC3PGZXywSvsjEaM16i0XxO4rzQb45dmRGMqH f/0kYYj5wTWZM2RVdV+uYNMYUoVk3U7kzw5uTMbNyu5I0esgB5Bjz/YM X-Gm-Gg: AR+sD12wNrN+zNEJkVsHacvwM6Cxl9p/vE1Vlx+PgwCE264jF5K40srLvybdO96SQTc k6WRnf2K9KEgVzFVkDrnBL/lXsf8688C+B6H0YxFDOh6x04IIl6udhe2SUfZDvj20icD7MsLm3z I/QfukR5Ah2lIbZJBSu0+3H0jrPtsIwKExnFkk7vt1aDOMnQ0AIr2PbWl0dM8vLdiX3YyxieZIS 2DF0T4Vl4qBmRdE/rNMFwC/KgJZwTi2lV01hNsr9QoArzagoixgLePYkPMXjKS6EXeQWxyvfH7q 60D3akIDe5WsYBxlMnp8EPSmmoQK+b+YfELp/VdICGwgbw3Wk2XdsfDTsGVrfIDH9c+Xb47c9gP 5zBT8mulN3dgzh8/0cB9X/85FRy0OOeLKBEUXsuyHxQ+IMoOjTyEmOSBvXQjrG0WonTvrTdYPZm wpHwr8CjiI6M4EJzKgNasz6uQt2rSRfRjD4MikoUf2mm9guoOYpxyWsdUYF7nkamYk1nfdCsSTh 6TJCvZwOWoa/5Mh/To3 X-Received: by 2002:a05:600c:628c:b0:499:87f3:a2a3 with SMTP id 5b1f17b1804b1-49987f3a33emr150605915e9.15.1786753185926; Fri, 14 Aug 2026 17:19:45 -0700 (PDT) Received: from im-t490s.redhat.com (89-24-57-65.nat.epc.tmcz.cz. [89.24.57.65]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4815f2b1d9bsm12315595f8f.24.2026.08.14.17.19.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Aug 2026 17:19:45 -0700 (PDT) From: Ilya Maximets To: netdev@vger.kernel.org Cc: David Ahern , Ido Schimmel , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , linux-kernel@vger.kernel.org, Ilya Maximets Subject: [PATCH net-next] net: ip_tunnel: remove unused non-strict __ip_tunnel_change_mtu Date: Sat, 15 Aug 2026 02:19:32 +0200 Message-ID: <20260815001942.1089545-1-i.maximets@ovn.org> X-Mailer: git-send-email 2.55.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The last user of this function was the recently removed vport-gre module from openvswitch. Let's drop the function. All other modules use the strict variant. Signed-off-by: Ilya Maximets Reviewed-by: Ido Schimmel --- include/net/ip_tunnels.h | 1 - net/ipv4/ip_tunnel.c | 17 ++--------------- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/include/net/ip_tunnels.h b/include/net/ip_tunnels.h index d708b66e55cd..a8bbbc5db5cb 100644 --- a/include/net/ip_tunnels.h +++ b/include/net/ip_tunnels.h @@ -412,7 +412,6 @@ bool ip_tunnel_parm_from_user(struct ip_tunnel_parm_ker= n *kp, bool ip_tunnel_parm_to_user(void __user *data, struct ip_tunnel_parm_kern = *kp); int ip_tunnel_siocdevprivate(struct net_device *dev, struct ifreq *ifr, void __user *data, int cmd); -int __ip_tunnel_change_mtu(struct net_device *dev, int new_mtu, bool stric= t); int ip_tunnel_change_mtu(struct net_device *dev, int new_mtu); =20 struct ip_tunnel *ip_tunnel_lookup(struct ip_tunnel_net *itn, diff --git a/net/ipv4/ip_tunnel.c b/net/ipv4/ip_tunnel.c index 9d114bd575f9..609aed527dda 100644 --- a/net/ipv4/ip_tunnel.c +++ b/net/ipv4/ip_tunnel.c @@ -1054,7 +1054,7 @@ int ip_tunnel_siocdevprivate(struct net_device *dev, = struct ifreq *ifr, } EXPORT_SYMBOL_GPL(ip_tunnel_siocdevprivate); =20 -int __ip_tunnel_change_mtu(struct net_device *dev, int new_mtu, bool stric= t) +int ip_tunnel_change_mtu(struct net_device *dev, int new_mtu) { struct ip_tunnel *tunnel =3D netdev_priv(dev); int t_hlen =3D tunnel->hlen + sizeof(struct iphdr); @@ -1063,25 +1063,12 @@ int __ip_tunnel_change_mtu(struct net_device *dev, = int new_mtu, bool strict) if (dev->type =3D=3D ARPHRD_ETHER) max_mtu -=3D dev->hard_header_len; =20 - if (new_mtu < ETH_MIN_MTU) + if (new_mtu < ETH_MIN_MTU || new_mtu > max_mtu) return -EINVAL; =20 - if (new_mtu > max_mtu) { - if (strict) - return -EINVAL; - - new_mtu =3D max_mtu; - } - WRITE_ONCE(dev->mtu, new_mtu); return 0; } -EXPORT_SYMBOL_GPL(__ip_tunnel_change_mtu); - -int ip_tunnel_change_mtu(struct net_device *dev, int new_mtu) -{ - return __ip_tunnel_change_mtu(dev, new_mtu, true); -} EXPORT_SYMBOL_GPL(ip_tunnel_change_mtu); =20 static void ip_tunnel_dev_free(struct net_device *dev) --=20 2.55.0