netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] ipv6: mark address parameters of udp_tunnel6_xmit_skb() as const
@ 2023-09-24 15:30 Beniamino Galvani
  2023-09-25 11:06 ` Guillaume Nault
  2023-10-03 10:10 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Beniamino Galvani @ 2023-09-24 15:30 UTC (permalink / raw)
  To: netdev
  Cc: David S . Miller, Jakub Kicinski, Paolo Abeni, David Ahern,
	Guillaume Nault, linux-kernel

The function doesn't modify the addresses passed as input, mark them
as 'const' to make that clear.

Signed-off-by: Beniamino Galvani <b.galvani@gmail.com>
---
 include/net/udp_tunnel.h  | 5 +++--
 net/ipv6/ip6_udp_tunnel.c | 5 +++--
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/include/net/udp_tunnel.h b/include/net/udp_tunnel.h
index 29251c3519cf..21ba0a25f936 100644
--- a/include/net/udp_tunnel.h
+++ b/include/net/udp_tunnel.h
@@ -154,8 +154,9 @@ void udp_tunnel_xmit_skb(struct rtable *rt, struct sock *sk, struct sk_buff *skb
 
 int udp_tunnel6_xmit_skb(struct dst_entry *dst, struct sock *sk,
 			 struct sk_buff *skb,
-			 struct net_device *dev, struct in6_addr *saddr,
-			 struct in6_addr *daddr,
+			 struct net_device *dev,
+			 const struct in6_addr *saddr,
+			 const struct in6_addr *daddr,
 			 __u8 prio, __u8 ttl, __be32 label,
 			 __be16 src_port, __be16 dst_port, bool nocheck);
 
diff --git a/net/ipv6/ip6_udp_tunnel.c b/net/ipv6/ip6_udp_tunnel.c
index cdc4d4ee2420..70d38705c92f 100644
--- a/net/ipv6/ip6_udp_tunnel.c
+++ b/net/ipv6/ip6_udp_tunnel.c
@@ -75,8 +75,9 @@ EXPORT_SYMBOL_GPL(udp_sock_create6);
 
 int udp_tunnel6_xmit_skb(struct dst_entry *dst, struct sock *sk,
 			 struct sk_buff *skb,
-			 struct net_device *dev, struct in6_addr *saddr,
-			 struct in6_addr *daddr,
+			 struct net_device *dev,
+			 const struct in6_addr *saddr,
+			 const struct in6_addr *daddr,
 			 __u8 prio, __u8 ttl, __be32 label,
 			 __be16 src_port, __be16 dst_port, bool nocheck)
 {
-- 
2.40.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] ipv6: mark address parameters of udp_tunnel6_xmit_skb() as const
  2023-09-24 15:30 [PATCH net-next] ipv6: mark address parameters of udp_tunnel6_xmit_skb() as const Beniamino Galvani
@ 2023-09-25 11:06 ` Guillaume Nault
  2023-10-03 10:10 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Guillaume Nault @ 2023-09-25 11:06 UTC (permalink / raw)
  To: Beniamino Galvani
  Cc: netdev, David S . Miller, Jakub Kicinski, Paolo Abeni,
	David Ahern, linux-kernel

On Sun, Sep 24, 2023 at 05:30:14PM +0200, Beniamino Galvani wrote:
> The function doesn't modify the addresses passed as input, mark them
> as 'const' to make that clear.

Reviewed-by: Guillaume Nault <gnault@redhat.com>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] ipv6: mark address parameters of udp_tunnel6_xmit_skb() as const
  2023-09-24 15:30 [PATCH net-next] ipv6: mark address parameters of udp_tunnel6_xmit_skb() as const Beniamino Galvani
  2023-09-25 11:06 ` Guillaume Nault
@ 2023-10-03 10:10 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-10-03 10:10 UTC (permalink / raw)
  To: Beniamino Galvani
  Cc: netdev, davem, kuba, pabeni, dsahern, gnault, linux-kernel

Hello:

This patch was applied to netdev/net-next.git (main)
by Paolo Abeni <pabeni@redhat.com>:

On Sun, 24 Sep 2023 17:30:14 +0200 you wrote:
> The function doesn't modify the addresses passed as input, mark them
> as 'const' to make that clear.
> 
> Signed-off-by: Beniamino Galvani <b.galvani@gmail.com>
> ---
>  include/net/udp_tunnel.h  | 5 +++--
>  net/ipv6/ip6_udp_tunnel.c | 5 +++--
>  2 files changed, 6 insertions(+), 4 deletions(-)

Here is the summary with links:
  - [net-next] ipv6: mark address parameters of udp_tunnel6_xmit_skb() as const
    https://git.kernel.org/netdev/net-next/c/f25e621f5d4c

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] 3+ messages in thread

end of thread, other threads:[~2023-10-03 10:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-24 15:30 [PATCH net-next] ipv6: mark address parameters of udp_tunnel6_xmit_skb() as const Beniamino Galvani
2023-09-25 11:06 ` Guillaume Nault
2023-10-03 10:10 ` 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).