The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Jack Ma <jack4it@gmail.com>
To: Ido Schimmel <idosch@nvidia.com>, netdev@vger.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>,
	linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org,
	Jack Ma <jack4it@gmail.com>
Subject: Re: [PATCH net-next v2 1/3] net: nexthop: add NHA_FDB_PORT for fdb nexthops
Date: Tue, 21 Jul 2026 22:19:05 +0000	[thread overview]
Message-ID: <20260721221907.2702-1-jack4it@gmail.com> (raw)
In-Reply-To: <20260721151741.GA2667735@shredder>

On Tue, Jul 21, 2026 at 06:17:41PM +0300, Ido Schimmel wrote:
> Maybe NLA_POLICY_MIN(NLA_BE16, 1) given that it's BE16 and that we don't
> dump / use a destination port of 0?

Done for v3.  Switched the NHA_FDB_PORT policy to
NLA_POLICY_MIN(NLA_BE16, 1), so the core rejects a zero destination
port for us; the "fdb + gateway" requirement stays in
rtm_to_nh_config().

> Why not nhi->fdb_port ?

Good catch.  Fixed for v3: nh_nlmsg_size_single() now reserves the
NHA_FDB_PORT space under "if (nhi->fdb_port)", matching the emit
condition in nh_fill_node() so the size calculation and the dump
agree and space is only reserved when a port is actually set.

Thanks,
Jack

  reply	other threads:[~2026-07-21 22:19 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-17  6:45 [PATCH net-next v2 0/3] net: nexthop: per-nexthop UDP dst port for fdb (VXLAN) nexthops Jack Ma
2026-07-17  6:45 ` [PATCH net-next v2 1/3] net: nexthop: add NHA_FDB_PORT for fdb nexthops Jack Ma
2026-07-21 15:17   ` Ido Schimmel
2026-07-21 22:19     ` Jack Ma [this message]
2026-07-17  6:45 ` [PATCH net-next v2 2/3] vxlan: honor per-nexthop fdb destination port Jack Ma
2026-07-21 15:18   ` Ido Schimmel
2026-07-21 22:19     ` Jack Ma
2026-07-17  6:45 ` [PATCH net-next v2 3/3] selftests: net: add coverage for fdb nexthop dst port Jack Ma
2026-07-21 15:20   ` Ido Schimmel
2026-07-21 22:19     ` 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=20260721221907.2702-1-jack4it@gmail.com \
    --to=jack4it@gmail.com \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=idosch@nvidia.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox