Thread (10 messages) 10 messages, 2 authors, 2d ago

Re: [PATCH net-next v2 1/3] net: nexthop: add NHA_FDB_PORT for fdb nexthops

From: Jack Ma <hidden>
Date: 2026-07-21 22:19:25
Also in: linux-kselftest, lkml

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help