mirror of
https://github.com/torvalds/linux.git
synced 2026-09-14 16:10:02 +02:00
net: gre: remove unused gretap_fb_dev_create
The only user was vport-gre in openvswitch and now it is gone. Signed-off-by: Ilya Maximets <i.maximets@ovn.org> Link: https://patch.msgid.link/20260804182049.2289754-6-i.maximets@ovn.org Signed-off-by: Paolo Abeni <pabeni@redhat.com>
This commit is contained in:
parent
e5ba332952
commit
9646825a51
|
|
@ -32,8 +32,6 @@ struct gre_protocol {
|
|||
int gre_add_protocol(const struct gre_protocol *proto, u8 version);
|
||||
int gre_del_protocol(const struct gre_protocol *proto, u8 version);
|
||||
|
||||
struct net_device *gretap_fb_dev_create(struct net *net, const char *name,
|
||||
u8 name_assign_type);
|
||||
int gre_parse_header(struct sk_buff *skb, struct tnl_ptk_info *tpi,
|
||||
bool *csum_err, __be16 proto, int nhs);
|
||||
|
||||
|
|
|
|||
|
|
@ -1716,53 +1716,6 @@ static struct rtnl_link_ops erspan_link_ops __read_mostly = {
|
|||
.get_link_net = ip_tunnel_get_link_net,
|
||||
};
|
||||
|
||||
struct net_device *gretap_fb_dev_create(struct net *net, const char *name,
|
||||
u8 name_assign_type)
|
||||
{
|
||||
struct rtnl_newlink_params params = { .src_net = net };
|
||||
struct nlattr *tb[IFLA_MAX + 1];
|
||||
struct net_device *dev;
|
||||
LIST_HEAD(list_kill);
|
||||
struct ip_tunnel *t;
|
||||
int err;
|
||||
|
||||
memset(&tb, 0, sizeof(tb));
|
||||
params.tb = tb;
|
||||
|
||||
dev = rtnl_create_link(net, name, name_assign_type,
|
||||
&ipgre_tap_ops, tb, NULL);
|
||||
if (IS_ERR(dev))
|
||||
return dev;
|
||||
|
||||
/* Configure flow based GRE device. */
|
||||
t = netdev_priv(dev);
|
||||
t->collect_md = true;
|
||||
|
||||
err = ipgre_newlink(dev, ¶ms, NULL);
|
||||
if (err < 0) {
|
||||
free_netdev(dev);
|
||||
return ERR_PTR(err);
|
||||
}
|
||||
|
||||
/* openvswitch users expect packet sizes to be unrestricted,
|
||||
* so set the largest MTU we can.
|
||||
*/
|
||||
err = __ip_tunnel_change_mtu(dev, IP_MAX_MTU, false);
|
||||
if (err)
|
||||
goto out;
|
||||
|
||||
err = rtnl_configure_link(dev, NULL, 0, NULL);
|
||||
if (err < 0)
|
||||
goto out;
|
||||
|
||||
return dev;
|
||||
out:
|
||||
ip_tunnel_dellink(dev, &list_kill);
|
||||
unregister_netdevice_many(&list_kill);
|
||||
return ERR_PTR(err);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(gretap_fb_dev_create);
|
||||
|
||||
static int __net_init ipgre_tap_init_net(struct net *net)
|
||||
{
|
||||
return ip_tunnel_init_net(net, gre_tap_net_id, &ipgre_tap_ops, "gretap0");
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user