* [PATCH 1/2 net-next] ipvlan: Fix a typo in a comment
@ 2024-01-05 9:27 Christophe JAILLET
2024-01-05 9:27 ` [PATCH 2/2 net-next] ipvlan: Remove usage of the deprecated ida_simple_xx() API Christophe JAILLET
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Christophe JAILLET @ 2024-01-05 9:27 UTC (permalink / raw)
To: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni
Cc: alexis.lothore, linux-kernel, kernel-janitors, Christophe JAILLET,
netdev
s/diffentiate/differentiate/
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
drivers/net/ipvlan/ipvlan_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ipvlan/ipvlan_main.c b/drivers/net/ipvlan/ipvlan_main.c
index f28fd7b6b708..e080e4fc41e4 100644
--- a/drivers/net/ipvlan/ipvlan_main.c
+++ b/drivers/net/ipvlan/ipvlan_main.c
@@ -601,7 +601,7 @@ 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()].
*/
--
2.34.1
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH 2/2 net-next] ipvlan: Remove usage of the deprecated ida_simple_xx() API 2024-01-05 9:27 [PATCH 1/2 net-next] ipvlan: Fix a typo in a comment Christophe JAILLET @ 2024-01-05 9:27 ` Christophe JAILLET 2024-01-06 19:09 ` Simon Horman 2024-01-06 19:07 ` [PATCH 1/2 net-next] ipvlan: Fix a typo in a comment Simon Horman 2024-01-07 22:40 ` patchwork-bot+netdevbpf 2 siblings, 1 reply; 5+ messages in thread From: Christophe JAILLET @ 2024-01-05 9:27 UTC (permalink / raw) To: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni Cc: alexis.lothore, linux-kernel, kernel-janitors, Christophe JAILLET, netdev ida_alloc() and ida_free() should be preferred to the deprecated ida_simple_get() and ida_simple_remove(). This is less verbose. Note that the upper bound of ida_alloc_range() is inclusive while the one of ida_simple_get() was exclusive. So calls have been updated accordingly. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> --- drivers/net/ipvlan/ipvlan_main.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/net/ipvlan/ipvlan_main.c b/drivers/net/ipvlan/ipvlan_main.c index e080e4fc41e4..df7c43a109e1 100644 --- a/drivers/net/ipvlan/ipvlan_main.c +++ b/drivers/net/ipvlan/ipvlan_main.c @@ -605,11 +605,11 @@ int ipvlan_link_new(struct net *src_net, struct net_device *dev, * 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; @@ -641,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; @@ -661,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); -- 2.34.1 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2 net-next] ipvlan: Remove usage of the deprecated ida_simple_xx() API 2024-01-05 9:27 ` [PATCH 2/2 net-next] ipvlan: Remove usage of the deprecated ida_simple_xx() API Christophe JAILLET @ 2024-01-06 19:09 ` Simon Horman 0 siblings, 0 replies; 5+ messages in thread From: Simon Horman @ 2024-01-06 19:09 UTC (permalink / raw) To: Christophe JAILLET Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni, alexis.lothore, linux-kernel, kernel-janitors, netdev On Fri, Jan 05, 2024 at 10:27:09AM +0100, Christophe JAILLET wrote: > ida_alloc() and ida_free() should be preferred to the deprecated > ida_simple_get() and ida_simple_remove(). > > This is less verbose. > > Note that the upper bound of ida_alloc_range() is inclusive while the one > of ida_simple_get() was exclusive. So calls have been updated accordingly. > > Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Reviewed-by: Simon Horman <horms@kernel.org> ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2 net-next] ipvlan: Fix a typo in a comment 2024-01-05 9:27 [PATCH 1/2 net-next] ipvlan: Fix a typo in a comment Christophe JAILLET 2024-01-05 9:27 ` [PATCH 2/2 net-next] ipvlan: Remove usage of the deprecated ida_simple_xx() API Christophe JAILLET @ 2024-01-06 19:07 ` Simon Horman 2024-01-07 22:40 ` patchwork-bot+netdevbpf 2 siblings, 0 replies; 5+ messages in thread From: Simon Horman @ 2024-01-06 19:07 UTC (permalink / raw) To: Christophe JAILLET Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni, alexis.lothore, linux-kernel, kernel-janitors, netdev On Fri, Jan 05, 2024 at 10:27:08AM +0100, Christophe JAILLET wrote: > s/diffentiate/differentiate/ > > Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Thanks, this looks good to me. And it appears this was the only spelling error that codespell sees in this file. Reviewed-by: Simon Horman <horms@kernel.org> ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2 net-next] ipvlan: Fix a typo in a comment 2024-01-05 9:27 [PATCH 1/2 net-next] ipvlan: Fix a typo in a comment Christophe JAILLET 2024-01-05 9:27 ` [PATCH 2/2 net-next] ipvlan: Remove usage of the deprecated ida_simple_xx() API Christophe JAILLET 2024-01-06 19:07 ` [PATCH 1/2 net-next] ipvlan: Fix a typo in a comment Simon Horman @ 2024-01-07 22:40 ` patchwork-bot+netdevbpf 2 siblings, 0 replies; 5+ messages in thread From: patchwork-bot+netdevbpf @ 2024-01-07 22:40 UTC (permalink / raw) To: Christophe JAILLET Cc: davem, edumazet, kuba, pabeni, alexis.lothore, linux-kernel, kernel-janitors, netdev Hello: This series was applied to netdev/net-next.git (main) by David S. Miller <davem@davemloft.net>: On Fri, 5 Jan 2024 10:27:08 +0100 you wrote: > s/diffentiate/differentiate/ > > Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> > --- > drivers/net/ipvlan/ipvlan_main.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Here is the summary with links: - [1/2,net-next] ipvlan: Fix a typo in a comment https://git.kernel.org/netdev/net-next/c/e900274f27c3 - [2/2,net-next] ipvlan: Remove usage of the deprecated ida_simple_xx() API https://git.kernel.org/netdev/net-next/c/3ee29a4474e3 You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-01-07 22:40 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2024-01-05 9:27 [PATCH 1/2 net-next] ipvlan: Fix a typo in a comment Christophe JAILLET 2024-01-05 9:27 ` [PATCH 2/2 net-next] ipvlan: Remove usage of the deprecated ida_simple_xx() API Christophe JAILLET 2024-01-06 19:09 ` Simon Horman 2024-01-06 19:07 ` [PATCH 1/2 net-next] ipvlan: Fix a typo in a comment Simon Horman 2024-01-07 22:40 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).