From: Beniamino Galvani <b.galvani@gmail.com>
To: netdev@vger.kernel.org
Cc: "David S . Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
David Ahern <dsahern@kernel.org>,
Guillaume Nault <gnault@redhat.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH net-next v2 2/7] ipv4: remove "proto" argument from udp_tunnel_dst_lookup()
Date: Mon, 16 Oct 2023 09:15:21 +0200 [thread overview]
Message-ID: <20231016071526.2958108-3-b.galvani@gmail.com> (raw)
In-Reply-To: <20231016071526.2958108-1-b.galvani@gmail.com>
The function is now UDP-specific, the protocol is always IPPROTO_UDP.
Suggested-by: Guillaume Nault <gnault@redhat.com>
Signed-off-by: Beniamino Galvani <b.galvani@gmail.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
---
drivers/net/bareudp.c | 4 ++--
include/net/udp_tunnel.h | 2 +-
net/ipv4/udp_tunnel_core.c | 4 ++--
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/net/bareudp.c b/drivers/net/bareudp.c
index 63fc32fa1af5..6af67cac6bde 100644
--- a/drivers/net/bareudp.c
+++ b/drivers/net/bareudp.c
@@ -307,7 +307,7 @@ static int bareudp_xmit_skb(struct sk_buff *skb, struct net_device *dev,
return -ESHUTDOWN;
rt = udp_tunnel_dst_lookup(skb, dev, bareudp->net, &saddr, info,
- IPPROTO_UDP, use_cache);
+ use_cache);
if (IS_ERR(rt))
return PTR_ERR(rt);
@@ -484,7 +484,7 @@ static int bareudp_fill_metadata_dst(struct net_device *dev,
__be32 saddr;
rt = udp_tunnel_dst_lookup(skb, dev, bareudp->net, &saddr,
- info, IPPROTO_UDP, use_cache);
+ info, use_cache);
if (IS_ERR(rt))
return PTR_ERR(rt);
diff --git a/include/net/udp_tunnel.h b/include/net/udp_tunnel.h
index 11e810ca5088..8f110dbd3784 100644
--- a/include/net/udp_tunnel.h
+++ b/include/net/udp_tunnel.h
@@ -166,7 +166,7 @@ struct rtable *udp_tunnel_dst_lookup(struct sk_buff *skb,
struct net_device *dev,
struct net *net, __be32 *saddr,
const struct ip_tunnel_info *info,
- u8 protocol, bool use_cache);
+ bool use_cache);
struct metadata_dst *udp_tun_rx_dst(struct sk_buff *skb, unsigned short family,
__be16 flags, __be64 tunnel_id,
diff --git a/net/ipv4/udp_tunnel_core.c b/net/ipv4/udp_tunnel_core.c
index 96f93f92b6ce..9b0cfd72d5fd 100644
--- a/net/ipv4/udp_tunnel_core.c
+++ b/net/ipv4/udp_tunnel_core.c
@@ -208,7 +208,7 @@ struct rtable *udp_tunnel_dst_lookup(struct sk_buff *skb,
struct net_device *dev,
struct net *net, __be32 *saddr,
const struct ip_tunnel_info *info,
- u8 protocol, bool use_cache)
+ bool use_cache)
{
#ifdef CONFIG_DST_CACHE
struct dst_cache *dst_cache;
@@ -227,7 +227,7 @@ struct rtable *udp_tunnel_dst_lookup(struct sk_buff *skb,
#endif
memset(&fl4, 0, sizeof(fl4));
fl4.flowi4_mark = skb->mark;
- fl4.flowi4_proto = protocol;
+ fl4.flowi4_proto = IPPROTO_UDP;
fl4.daddr = info->key.u.ipv4.dst;
fl4.saddr = info->key.u.ipv4.src;
tos = info->key.tos;
--
2.40.1
next prev parent reply other threads:[~2023-10-16 7:15 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-16 7:15 [PATCH net-next v2 0/7] net: consolidate IPv4 route lookup for UDP tunnels Beniamino Galvani
2023-10-16 7:15 ` [PATCH net-next v2 1/7] ipv4: rename and move ip_route_output_tunnel() Beniamino Galvani
2023-10-16 7:15 ` Beniamino Galvani [this message]
2023-10-16 7:15 ` [PATCH net-next v2 3/7] ipv4: add new arguments to udp_tunnel_dst_lookup() Beniamino Galvani
2023-10-16 7:15 ` [PATCH net-next v2 4/7] ipv4: use tunnel flow flags for tunnel route lookups Beniamino Galvani
2023-10-16 7:15 ` [PATCH net-next v2 5/7] geneve: add dsfield helper function Beniamino Galvani
2023-10-16 7:15 ` [PATCH net-next v2 6/7] geneve: use generic function for tunnel IPv4 route lookup Beniamino Galvani
2023-10-16 7:15 ` [PATCH net-next v2 7/7] vxlan: " Beniamino Galvani
2023-10-16 9:00 ` [PATCH net-next v2 0/7] net: consolidate IPv4 route lookup for UDP tunnels patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231016071526.2958108-3-b.galvani@gmail.com \
--to=b.galvani@gmail.com \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=gnault@redhat.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).