Skip to contentSkip to conversation

vxlan: Remove unnecessary comments for vxlan_rcv() and vxlan_err_lookup()

PATCH Applied Ted Chen 4 participants 4 messages Feb 6, 2025 – Feb 7, 2025

Subsystems (2)
lore
Share & tools
lore

Ted Chen

author
#0 lore raw

PATCH v2 1/1 vxlan: Remove unnecessary comments for vxlan_rcv() and vxlan_err_lookup()

Remove the two unnecessary comments around vxlan_rcv() and vxlan_err_lookup(), which indicate that the callers are from net/ipv{4,6}/udp.c. These callers are trivial to find. Additionally, the comment for vxlan_rcv() missed that the caller could also be from net/ipv6/udp.c.

---
v2: removed the comments for vxlan_rcv() and vxlan_err_lookup().
(Nikolay, Ido)
v1: https://lore.kernel.org/all/[email protected]

---
 drivers/net/vxlan/vxlan_core.c | 2 --
 1 file changed, 2 deletions(-)
drivers/net/vxlan/vxlan_core.c +0 -2
index ece5415f9013..44eba7aa831a 100644
@@ -1670,7 +1670,6 @@ static bool vxlan_ecn_decapsulate(struct vxlan_sock *vs, void *oiph,
 	return err <= 1;
 }
 
-/* Callback from net/ipv4/udp.c to receive packets */
 static int vxlan_rcv(struct sock *sk, struct sk_buff *skb)
 {
 	struct vxlan_vni_node *vninode = NULL;
@@ -1840,7 +1839,6 @@ static int vxlan_rcv(struct sock *sk, struct sk_buff *skb)
 	return 0;
 }
 
-/* Callback from net/ipv{4,6}/udp.c to check that we have a VNI for errors */
 static int vxlan_err_lookup(struct sock *sk, struct sk_buff *skb)
 {
 	struct vxlan_dev *vxlan;
Signature · 1 line
2.39.2
Acked-by on v2 1/1
#1 lore raw
Quoted 30 lines · Ted Chen

Remove the two unnecessary comments around vxlan_rcv() and vxlan_err_lookup(), which indicate that the callers are from net/ipv{4,6}/udp.c. These callers are trivial to find. Additionally, the comment for vxlan_rcv() missed that the caller could also be from net/ipv6/udp.c.

---
v2: removed the comments for vxlan_rcv() and vxlan_err_lookup().
(Nikolay, Ido)
v1: https://lore.kernel.org/all/[email protected]

---
 drivers/net/vxlan/vxlan_core.c | 2 --
 1 file changed, 2 deletions(-)
drivers/net/vxlan/vxlan_core.c +0 -1
index ece5415f9013..44eba7aa831a 100644
@@ -1670,7 +1670,6 @@ static bool vxlan_ecn_decapsulate(struct vxlan_sock *vs, void *oiph,
 	return err <= 1;
 }
 
-/* Callback from net/ipv4/udp.c to receive packets */
 static int vxlan_rcv(struct sock *sk, struct sk_buff *skb)
 {
 	struct vxlan_vni_node *vninode = NULL;

drivers/net/vxlan/vxlan_core.c static int vxlan_rcv(struct sock *sk, struct sk_buff *skb) · line 1844

Quoted 7 lines
drivers/net/vxlan/vxlan_core.c +0 -1
@@ -1840,7 +1839,6 @@ static int vxlan_rcv(struct sock *sk, struct sk_buff *skb)
 	return 0;
 }
 
-/* Callback from net/ipv{4,6}/udp.c to check that we have a VNI for errors */
 static int vxlan_err_lookup(struct sock *sk, struct sk_buff *skb)
 {
 	struct vxlan_dev *vxlan;

LGTM,

Reviewed-by on v2 1/1
#2 lore raw
In reply to Ted Chen
Quoted 9 lines · Ted Chen

Remove the two unnecessary comments around vxlan_rcv() and vxlan_err_lookup(), which indicate that the callers are from net/ipv{4,6}/udp.c. These callers are trivial to find. Additionally, the comment for vxlan_rcv() missed that the caller could also be from net/ipv6/udp.c.

#3 lore raw
In reply to Ted Chen
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Quoted 11 lines · On Thu, 6 Feb 2025 22:00:02 +0800 you wrote:

Remove the two unnecessary comments around vxlan_rcv() and vxlan_err_lookup(), which indicate that the callers are from net/ipv{4,6}/udp.c. These callers are trivial to find. Additionally, the comment for vxlan_rcv() missed that the caller could also be from net/ipv6/udp.c.

[...]

Here is the summary with links:
- [net-next,v2] vxlan: Remove unnecessary comments for vxlan_rcv() and vxlan_err_lookup()

    https://git.kernel.org/netdev/net-next/c/a494d1512c7c

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html