Page MenuHomeVyOS Platform

VPP VLAN interface keeps A/D when it's not disabled
In progress, HighPublicBUG

Description

VyOS config:

vyos@vyos# show interfaces ethernet eth103
 mtu 9216
 offload {
     gro
     gso
     sg
     tso
 }
 vif 1021 {
     address x.x.x.x/xx
     mtu 1500
 }
 vif 1051 {
     address x.x.x.x/xx
     mtu 9000
 }
 vif 1052 {
     address x.x.x.x/xx
     mtu 9000
 }

Interface:

Interface    IP Address                           MAC                VRF        MTU  S/L    Description
-----------  -----------------------------------  -----------------  -------  -----  -----  ----------------------------------
eth103       -                                    b8:3f:d2:52:12:2c  default   9216  u/u    
eth103.1021  x.x.x.x/xx                  b8:3f:d2:52:12:2c  default   1500  A/D    
eth103.1051  x.x.x.x/xx                       b8:3f:d2:52:12:2c  default   9000  A/D    
eth103.1052  x.x.x.x/xx                       b8:3f:d2:52:12:2c  default   9000  u/u

VPP log:

Aug 24 02:52:03 core-ams-nl vpp[2404]: ip6/link: set-ll: eth103.1051 -> fe80::ba3f:d2ff:fe52:122c
Aug 24 02:52:03 core-ams-nl vpp[2404]: linux-cp/router: Early message received for eth103.1051
Aug 24 02:52:03 core-ams-nl vpp[2404]: linux-cp/itf: interface_add: eth103.1052 has parent itf-pair: [0] eth103 tap4096 eth103
Aug 24 02:52:03 core-ams-nl vpp[2404]: linux-cp/itf: pair_create: subif: dot1q outer 1052 inner 0 on eth103
Aug 24 02:52:03 core-ams-nl vpp[2404]: linux-cp/itf: pair create: {eth103.1052, tap4096.1052, eth103.1052}
Aug 24 02:52:03 core-ams-nl vpp[2404]: linux-cp/itf: add: host:tap4096.1052 phy:eth103.1052, host_if:eth103.1052
Aug 24 02:52:03 core-ams-nl vpp[2404]: clib_c11_violation: s1 NULL
Aug 24 02:52:03 core-ams-nl vpp[2404]: clib_c11_violation: s2 NULL
Aug 24 02:52:03 core-ams-nl vpp[2404]: linux-cp/itf: pair create: itf-pair: [8] eth103.1052 tap4096.1052 eth103.1052
Aug 24 02:52:03 core-ams-nl vpp[2404]: linux-cp/router: failed create vlan: eth103.1052 on tap4096
Aug 24 02:52:03 core-ams-nl vpp[2404]: linux-cp/router: Early message received for eth103.1051
Aug 24 02:52:03 core-ams-nl vpp[2404]: linux-cp/router: ignore link add: (nil) - defunct_eth103
Aug 24 02:52:03 core-ams-nl vpp[2404]: ip6/link: set-ll: eth104 -> fe80::9a03:9bff:fe9f:5a93
Aug 24 02:52:03 core-ams-nl vpp[2404]: linux-cp/router: ignore link add: (nil) - defunct_eth103
Aug 24 02:52:03 core-ams-nl vpp[2404]: ip6/link: disable: eth103.1021
Aug 24 02:52:03 core-ams-nl vpp[2404]: ip6/link: disable: eth103.1051
Aug 24 02:52:03 core-ams-nl vpp[2404]: ip6/link: enable: eth103.1052

Solution:

https://github.com/FDio/vpp/blob/08d5ec2821c7678db73cb829095df4f12899fc52/src/plugins/linux-cp/lcp_interface_sync.c#L377

patch this line to:

-  if (!lcp_auto_subint ())
+  if (!lcp_auto_subint () || lcp_get_netlink_processing_active ())
     return NULL;

Should I submit a PR to https://github.com/vyos/vyos-vpp-patches or directly submit it to vpp upstream?

Details

Version
2026.08.22-0013-rolling
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Unspecified (please specify)

Event Timeline

Viacheslav raised the priority of this task from Low to High.Tue, Aug 25, 12:24 PM
Viacheslav subscribed.

Hi @canoziia
Our developers will review the suggested fix and add the correct patch for the rolling/patched version.

It is always a good idea to have the appropriate fix in the upstream repo.

Viacheslav changed the subtype of this task from "Task" to "Bug".Tue, Aug 25, 12:34 PM

Hello, I finally use 2 patches to solve this:

diff --git a/src/plugins/linux-cp/lcp_interface_sync.c b/src/plugins/linux-cp/lcp_interface_sync.c
index ca7638e..61db256 100644
--- a/src/plugins/linux-cp/lcp_interface_sync.c
+++ b/src/plugins/linux-cp/lcp_interface_sync.c
@@ -363,7 +363,7 @@ lcp_itf_interface_add_del (vnet_main_t *vnm, u32 sw_if_index, u32 is_create)
   const vnet_sw_interface_t *sw;
   uword is_sub;
 
-  if (!lcp_auto_subint ())
+  if (!lcp_auto_subint () || lcp_get_netlink_processing_active ())
     return NULL;
src/plugins/linux-cp/lcp_router.c:
@@ -420,6 +420,7 @@ lcp_router_link_add (struct rtnl_link *rl, void *ctx)
 	{
 	  u32 sub_phy_sw_if_index, sub_host_sw_if_index;
 	  const lcp_itf_pair_t *lip;
+	  lcp_itf_pair_t *sub_lip;
 	  int vlan;
 	  u8 *ns = 0; /* FIXME */
@@ -470,6 +471,13 @@ lcp_router_link_add (struct rtnl_link *rl, void *ctx)
 	  lcp_itf_pair_add (sub_host_sw_if_index, sub_phy_sw_if_index,
 			    if_namev, rtnl_link_get_ifindex (rl),
 			    lip->lip_host_type, ns);
+
+	  sub_lip = lcp_itf_pair_get (
+	    lcp_itf_pair_find_by_phy (sub_phy_sw_if_index));
+	  if (sub_lip)
+	    sub_lip->lip_create_ts =
+	      ctx ? ((nl_msg_info_t *) ctx)->ts : 0;
+
 	  if (up)
 	    vnet_sw_interface_admin_up (vnet_get_main (), sub_phy_sw_if_index);

If you don't mind I can post a report from LLM. Although it's long, I think it did find the problem.

@canoziia we've discussed with maintainers, could you add a PR for the vyos-vpp-patches repo?

Viacheslav changed the task status from Open to In progress.Wed, Aug 26, 4:06 PM