Re: [PATCH net-next v3 1/6] net: lwtunnel: change encap fill order
From: Ido Schimmel
Date: Thu Oct 01 2026 - 10:19:16 EST
On Wed, Sep 30, 2026 at 09:50:52AM +0800, Hangbin Liu wrote:
> From: Hangbin Liu <liuhangbin@xxxxxxxxxx>
>
> I plan to add lwtunnel encap attributes to the YNL rt-route.yaml spec.
> When decoding submessages, YNL expects to read the "selector" (encap-type)
> first. Currently lwtunnel writes the encap payload first, which makes YNL
> fail to parse the lwtunnel encap message.
>
> Fixing this within YNL itself would be complicated. Instead, reorder the
> netlink attributes in the kernel to output encap_type first.
>
> This is a preparatory change for the upcoming rt-route spec updates.
>
> Signed-off-by: Hangbin Liu <liuhangbin@xxxxxxxxxx>
Reviewed-by: Ido Schimmel <idosch@xxxxxxxxxx>
In case the bots will complain: It's OK not to trim the type attribute
upon fill_encap() failure given that the callers cancel the entire
message.