From: Petr Machata <petrm@nvidia.com>
To: David Ahern <dsahern@gmail.com>, <netdev@vger.kernel.org>
Cc: Ido Schimmel <idosch@nvidia.com>, Petr Machata <petrm@nvidia.com>
Subject: [PATCH iproute2-next] ip: VXLAN: Add support for IFLA_VXLAN_MC_ROUTE
Date: Wed, 18 Jun 2025 17:44:43 +0200 [thread overview]
Message-ID: <14b0000cd0f10a03841ce62c40501a2dc1df2bc4.1750259118.git.petrm@nvidia.com> (raw)
The flag controls whether underlay packets should be MC-routed or (default)
sent to the indicated physical netdevice.
Signed-off-by: Petr Machata <petrm@nvidia.com>
---
ip/iplink_vxlan.c | 10 ++++++++++
man/man8/ip-link.8.in | 10 ++++++++++
2 files changed, 20 insertions(+)
diff --git a/ip/iplink_vxlan.c b/ip/iplink_vxlan.c
index 9649a8eb..a6e95398 100644
--- a/ip/iplink_vxlan.c
+++ b/ip/iplink_vxlan.c
@@ -37,6 +37,7 @@ static const struct vxlan_bool_opt {
{ "remcsum_tx", IFLA_VXLAN_REMCSUM_TX, false },
{ "remcsum_rx", IFLA_VXLAN_REMCSUM_RX, false },
{ "localbypass", IFLA_VXLAN_LOCALBYPASS, true },
+ { "mcroute", IFLA_VXLAN_MC_ROUTE, false },
};
static void print_explain(FILE *f)
@@ -67,6 +68,7 @@ static void print_explain(FILE *f)
" [ [no]localbypass ]\n"
" [ [no]external ] [ gbp ] [ gpe ]\n"
" [ [no]vnifilter ]\n"
+ " [ [no]mcroute ]\n"
"\n"
"Where: VNI := 0-16777215\n"
" ADDR := { IP_ADDRESS | any }\n"
@@ -378,6 +380,14 @@ static int vxlan_parse_opt(struct link_util *lu, int argc, char **argv,
check_duparg(&attrs, IFLA_VXLAN_VNIFILTER,
*argv, *argv);
addattr8(n, 1024, IFLA_VXLAN_VNIFILTER, 0);
+ } else if (!strcmp(*argv, "mcroute")) {
+ check_duparg(&attrs, IFLA_VXLAN_MC_ROUTE,
+ *argv, *argv);
+ addattr8(n, 1024, IFLA_VXLAN_MC_ROUTE, 1);
+ } else if (!strcmp(*argv, "nomcroute")) {
+ check_duparg(&attrs, IFLA_VXLAN_MC_ROUTE,
+ *argv, *argv);
+ addattr8(n, 1024, IFLA_VXLAN_MC_ROUTE, 0);
} else if (matches(*argv, "help") == 0) {
explain();
return -1;
diff --git a/man/man8/ip-link.8.in b/man/man8/ip-link.8.in
index 91fa0cf1..e3297c57 100644
--- a/man/man8/ip-link.8.in
+++ b/man/man8/ip-link.8.in
@@ -663,6 +663,8 @@ the following additional arguments are supported:
.B gpe
] [
.RB [ no ] vnifilter
+] [
+.RB [ no ] mcroute
]
.in +8
@@ -796,6 +798,14 @@ device with external flag set. once enabled, bridge vni command is used to manag
vni filtering table on the device. The device can only receive packets with vni's configured
in the vni filtering table.
+.sp
+.RB [ no ] mcroute
+- when the VXLAN tunnel has a multicast remote, whether the underlay packets
+should be sent directly to the physical device (the default), or whether they
+should be multicast-routed. In the latter case, for purposes of matching a
+multicast route, (S,G) are, respectively, local and remote address of the
+tunnel, and iif is the tunnel physical device.
+
.sp
.B gbp
- enables the Group Policy extension (VXLAN-GBP).
--
2.49.0
next reply other threads:[~2025-06-18 15:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-18 15:44 Petr Machata [this message]
2025-06-19 5:38 ` [PATCH iproute2-next] ip: VXLAN: Add support for IFLA_VXLAN_MC_ROUTE Ido Schimmel
2025-06-22 17:00 ` 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=14b0000cd0f10a03841ce62c40501a2dc1df2bc4.1750259118.git.petrm@nvidia.com \
--to=petrm@nvidia.com \
--cc=dsahern@gmail.com \
--cc=idosch@nvidia.com \
--cc=netdev@vger.kernel.org \
/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