diff options
author | Ingo Molnar <mingo@kernel.org> | 2024-01-26 10:26:50 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2024-01-26 10:26:50 +0100 |
commit | 42ac0be18bfa09c03f52244f7c3e15c89b38532f (patch) | |
tree | 601fd5e6da2ca0b77aa8cb22f0e81a29ba6fe1d6 /drivers/net/ipvlan/ipvlan_main.c | |
parent | 8e5647a723c49d73b9f108a8bb38e8c29d3948ea (diff) | |
parent | ecb1b8288dc7ccbdcb3b9df005fa1c0e0c0388a7 (diff) |
Merge branch 'linus' into x86/mm, to refresh the branch and pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'drivers/net/ipvlan/ipvlan_main.c')
-rw-r--r-- | drivers/net/ipvlan/ipvlan_main.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/net/ipvlan/ipvlan_main.c b/drivers/net/ipvlan/ipvlan_main.c index 57c79f5f2991..df7c43a109e1 100644 --- a/drivers/net/ipvlan/ipvlan_main.c +++ b/drivers/net/ipvlan/ipvlan_main.c @@ -387,6 +387,7 @@ static const struct header_ops ipvlan_header_ops = { .parse = eth_header_parse, .cache = eth_header_cache, .cache_update = eth_header_cache_update, + .parse_protocol = eth_header_parse_protocol, }; static void ipvlan_adjust_mtu(struct ipvl_dev *ipvlan, struct net_device *dev) @@ -600,15 +601,15 @@ int ipvlan_link_new(struct net *src_net, struct net_device *dev, port->dev_id_start = 0x1; /* Since L2 address is shared among all IPvlan slaves including - * master, use unique 16 bit dev-ids to diffentiate among them. + * master, use unique 16 bit dev-ids to differentiate among them. * Assign IDs between 0x1 and 0xFFFE (used by the master) to each * slave link [see addrconf_ifid_eui48()]. */ - err = ida_simple_get(&port->ida, port->dev_id_start, 0xFFFE, - GFP_KERNEL); + err = ida_alloc_range(&port->ida, port->dev_id_start, 0xFFFD, + GFP_KERNEL); if (err < 0) - err = ida_simple_get(&port->ida, 0x1, port->dev_id_start, - GFP_KERNEL); + err = ida_alloc_range(&port->ida, 0x1, port->dev_id_start - 1, + GFP_KERNEL); if (err < 0) goto unregister_netdev; dev->dev_id = err; @@ -640,7 +641,7 @@ int ipvlan_link_new(struct net *src_net, struct net_device *dev, unlink_netdev: netdev_upper_dev_unlink(phy_dev, dev); remove_ida: - ida_simple_remove(&port->ida, dev->dev_id); + ida_free(&port->ida, dev->dev_id); unregister_netdev: unregister_netdevice(dev); return err; @@ -660,7 +661,7 @@ void ipvlan_link_delete(struct net_device *dev, struct list_head *head) } spin_unlock_bh(&ipvlan->addrs_lock); - ida_simple_remove(&ipvlan->port->ida, dev->dev_id); + ida_free(&ipvlan->port->ida, dev->dev_id); list_del_rcu(&ipvlan->pnode); unregister_netdevice_queue(dev, head); netdev_upper_dev_unlink(ipvlan->phy_dev, dev); |