mirror of
https://github.com/torvalds/linux.git
synced 2026-09-23 05:04:02 +02:00
net: ip_tunnel: remove unused non-strict __ip_tunnel_change_mtu
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 <i.maximets@ovn.org> Reviewed-by: Ido Schimmel <idosch@nvidia.com> Link: https://patch.msgid.link/20260815001942.1089545-1-i.maximets@ovn.org Signed-off-by: Paolo Abeni <pabeni@redhat.com>
This commit is contained in:
parent
d92255b405
commit
66da914db4
|
|
@ -412,7 +412,6 @@ bool ip_tunnel_parm_from_user(struct ip_tunnel_parm_kern *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 strict);
|
||||
int ip_tunnel_change_mtu(struct net_device *dev, int new_mtu);
|
||||
|
||||
struct ip_tunnel *ip_tunnel_lookup(struct ip_tunnel_net *itn,
|
||||
|
|
|
|||
|
|
@ -1054,7 +1054,7 @@ int ip_tunnel_siocdevprivate(struct net_device *dev, struct ifreq *ifr,
|
|||
}
|
||||
EXPORT_SYMBOL_GPL(ip_tunnel_siocdevprivate);
|
||||
|
||||
int __ip_tunnel_change_mtu(struct net_device *dev, int new_mtu, bool strict)
|
||||
int ip_tunnel_change_mtu(struct net_device *dev, int new_mtu)
|
||||
{
|
||||
struct ip_tunnel *tunnel = netdev_priv(dev);
|
||||
int t_hlen = 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 == ARPHRD_ETHER)
|
||||
max_mtu -= dev->hard_header_len;
|
||||
|
||||
if (new_mtu < ETH_MIN_MTU)
|
||||
if (new_mtu < ETH_MIN_MTU || new_mtu > max_mtu)
|
||||
return -EINVAL;
|
||||
|
||||
if (new_mtu > max_mtu) {
|
||||
if (strict)
|
||||
return -EINVAL;
|
||||
|
||||
new_mtu = 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);
|
||||
|
||||
static void ip_tunnel_dev_free(struct net_device *dev)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user