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 4/7] ipv4: use tunnel flow flags for tunnel route lookups
Date: Mon, 16 Oct 2023 09:15:23 +0200 [thread overview]
Message-ID: <20231016071526.2958108-5-b.galvani@gmail.com> (raw)
In-Reply-To: <20231016071526.2958108-1-b.galvani@gmail.com>
Commit 451ef36bd229 ("ip_tunnels: Add new flow flags field to
ip_tunnel_key") added a new field to struct ip_tunnel_key to control
route lookups. Currently the flag is used by vxlan and geneve tunnels;
use it also in udp_tunnel_dst_lookup() so that it affects all tunnel
types relying on this function.
Signed-off-by: Beniamino Galvani <b.galvani@gmail.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
---
net/ipv4/udp_tunnel_core.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/ipv4/udp_tunnel_core.c b/net/ipv4/udp_tunnel_core.c
index 494685e82856..a87defb2b167 100644
--- a/net/ipv4/udp_tunnel_core.c
+++ b/net/ipv4/udp_tunnel_core.c
@@ -232,6 +232,7 @@ struct rtable *udp_tunnel_dst_lookup(struct sk_buff *skb,
fl4.fl4_dport = dport;
fl4.fl4_sport = sport;
fl4.flowi4_tos = RT_TOS(tos);
+ fl4.flowi4_flags = key->flow_flags;
rt = ip_route_output_key(net, &fl4);
if (IS_ERR(rt)) {
--
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 ` [PATCH net-next v2 2/7] ipv4: remove "proto" argument from udp_tunnel_dst_lookup() Beniamino Galvani
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 ` Beniamino Galvani [this message]
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-5-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).