From: Ido Schimmel <idosch@nvidia.com>
To: Jack Ma <jack4it@gmail.com>, dsahern@kernel.org
Cc: David Ahern <dsahern@kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Simon Horman <horms@kernel.org>, Shuah Khan <shuah@kernel.org>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-kselftest@vger.kernel.org
Subject: Re: [PATCH net-next v3 1/3] net: nexthop: add NHA_FDB_PORT for fdb nexthops
Date: Wed, 22 Jul 2026 14:46:21 +0300 [thread overview]
Message-ID: <20260722114621.GA2928696@shredder> (raw)
In-Reply-To: <20260721-b4-vxlan-fdb-port-v3-1-9aa0a543a78a@gmail.com>
On Tue, Jul 21, 2026 at 10:29:50PM +0000, Jack Ma wrote:
> Commit 1274e1cc4226 ("vxlan: ecmp support for mac fdb entries") lets a
> single inner MAC be reached through a group of remote VTEPs, with the
> kernel flow-hashing across the group members. Each member carries its
> own remote IP, but the UDP destination port is always taken from the
> VXLAN device (vxlan->cfg.dst_port) and cannot be set per member.
>
> Some deployments pack several receivers behind one underlay IP and tell
> them apart by UDP port, so they need a per-nexthop destination port to
> spread flows across (IP, port) tuples rather than IP alone.
>
> Add a netlink attribute NHA_FDB_PORT (__be16, mirroring NDA_PORT) that
> carries an optional UDP destination port on an fdb nexthop. It is only
> accepted together with NHA_FDB and NHA_GATEWAY; it is stored in struct
> nh_info and echoed back on dump. This patch is control-plane plumbing
> only; the VXLAN datapath is wired up in a follow-up patch, so behaviour
> is unchanged for now.
I looked more closely at the test and the iproute2 patch and wanted to
comment that "port" seems too generic given that the attribute is
specific to FDB nexthops and called NHA_FDB_PORT. It made me think that
maybe we should use a more generic attribute name (e.g., NHA_DST_PORT)
and a corresponding "dst_port" keyword in iproute2. We can still limit
this to FDB nexthops during validation, but in the unlikely case that we
will need a destination port for other nexthops, we could just reuse
this attribute. It's not like we have NHA_FDB_GATEWAY.
David, WDYT?
>
> Signed-off-by: Jack Ma <jack4it@gmail.com>
> ---
> include/net/nexthop.h | 2 ++
> include/uapi/linux/nexthop.h | 3 +++
> net/ipv4/nexthop.c | 20 +++++++++++++++++++-
> 3 files changed, 24 insertions(+), 1 deletion(-)
>
> diff --git a/include/net/nexthop.h b/include/net/nexthop.h
> index 572e69cda476..9c822799634f 100644
> --- a/include/net/nexthop.h
> +++ b/include/net/nexthop.h
> @@ -28,6 +28,7 @@ struct nh_config {
> u8 nh_protocol;
> u8 nh_blackhole;
> u8 nh_fdb;
> + __be16 nh_fdb_port;
This will be nh_dst_port and similarly in other places throughout the
patchset
> u32 nh_flags;
>
> int nh_ifindex;
next prev parent reply other threads:[~2026-07-22 11:46 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-21 22:29 [PATCH net-next v3 0/3] net: nexthop: per-nexthop UDP dst port for fdb (VXLAN) nexthops Jack Ma
2026-07-21 22:29 ` [PATCH net-next v3 1/3] net: nexthop: add NHA_FDB_PORT for fdb nexthops Jack Ma
2026-07-22 11:46 ` Ido Schimmel [this message]
2026-07-22 14:43 ` David Ahern
2026-07-22 15:23 ` Ido Schimmel
2026-07-21 22:29 ` [PATCH net-next v3 2/3] vxlan: honor per-nexthop fdb destination port Jack Ma
2026-07-21 22:29 ` [PATCH net-next v3 3/3] selftests: net: add coverage for fdb nexthop dst port Jack Ma
2026-07-22 12:58 ` Ido Schimmel
2026-07-22 1:05 ` [PATCH net-next v3 0/3] net: nexthop: per-nexthop UDP dst port for fdb (VXLAN) nexthops Jakub Kicinski
2026-07-22 3:28 ` Jack Ma
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=20260722114621.GA2928696@shredder \
--to=idosch@nvidia.com \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=jack4it@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=shuah@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.