> -----Original Message----- > From: Francois <rigault.francois@xxxxxxxxx> > Sent: Sunday, April 14, 2024 1:15 PM > To: linux-hyperv@xxxxxxxxxxxxxxx > Subject: Nic flaps for 1 minute when reconnecting > > [You don't often get email from rigault.francois@xxxxxxxxx. Learn why > this is important at https://aka.ms/LearnAboutSenderIdentification ] > > hello (I'm not subscribed to this list) > I run a few Linux machines on Hyper-V on my Windows 10 laptop > and notice that, from time to time, they lose the network for about 1 > minute > (briefly coming back up then down again) > I don't know what the actual trigger is, but I believe the "flapping" > is caused by the delay linked to "LINKCHANGE_INT". > > Following is how I reproduce, the logs on Linux side, Windows side, > and patch I am running to avoid this. > > I manage to reproduce this way: in Windows, run the "Services" app, > right click the "Internet Connecting Sharing (ICS)" service, choose > restart... > > on my VM I read these logs: > > ---- > déc. 24 09:39:33 stream kernel: hv_netvsc > 9538b269-5961-4c95-aa0b-b2994c468668 enx00155d343101: > RNDIS_MSG_INDICATE (len 176, status 0x40020006, buf len 156, buf > offset 12) > déc. 24 09:39:33 stream kernel: hv_netvsc > 9538b269-5961-4c95-aa0b-b2994c468668 enx00155d343101: > RNDIS_MSG_INDICATE (len 20, status 0x4001000c, buf len 0, buf offset > 0) > déc. 24 09:39:33 stream kernel: hv_netvsc > 9538b269-5961-4c95-aa0b-b2994c468668 enx00155d343101: > RNDIS_MSG_INDICATE (len 20, status 0x4001000c, buf len 0, buf offset > 0) > déc. 24 09:39:33 stream NetworkManager[1013]: <trace> > [1703407173.1367] platform-linux: event-notification: RTM_NEWLINK, > flags 0, seq 0: 2: enx00155d343101 <UP;broadcast,multicast,up> mtu > 1500 arp 1 ethernet? not-init addrgenmode none>déc. 24 09:39:33 stream > NetworkManager[1013]: <debug> [1703407173.1368] platform: > (enx00155d343101) signal: link changed: 2: enx00155d343101 > <UP;broadcast,multicast,up> mtu 1500 arp 1 ethernet? init addrgenmode > none addr 00:15:5D:34:3>déc. 24 09:39:33 stream NetworkManager[1013]: > <trace> [1703407173.1368] l3cfg[17837add519934e3,ifindex=2]: emit > signal (platform-change, obj-type=link, change=changed, obj=2: > enx00155d343101 <UP;broadcast,multicast,up> mtu 1500 arp 1 >déc. 24 > 09:39:33 stream kernel: hv_netvsc 9538b269-5961-4c95-aa0b-b2994c468668 > enx00155d343101: RNDIS_MSG_INDICATE (len 20, status 0x4001000b, buf > len 0, buf offset 0) > déc. 24 09:39:33 stream kernel: hv_netvsc > 9538b269-5961-4c95-aa0b-b2994c468668 enx00155d343101: > RNDIS_MSG_INDICATE (len 20, status 0x4001000b, buf len 0, buf offset > 0) > déc. 24 09:39:33 stream kernel: hv_netvsc > 9538b269-5961-4c95-aa0b-b2994c468668 enx00155d343101: > RNDIS_MSG_INDICATE (len 176, status 0x40020006, buf len 156, buf > offset 12) > déc. 24 09:39:33 stream NetworkManager[1013]: <debug> > [1703407173.1368] device[cf06ffc422da9956] (enx00155d343101): queued > link change for ifindex 2 > déc. 24 09:39:33 stream NetworkManager[1013]: <debug> > [1703407173.1371] device[cf06ffc422da9956] (enx00155d343101): carrier: > link disconnected (deferring action for 6000 milliseconds) > déc. 24 09:39:33 stream kernel: hv_netvsc > 9538b269-5961-4c95-aa0b-b2994c468668 enx00155d343101: > RNDIS_MSG_INDICATE (len 176, status 0x40020006, buf len 156, buf > offset 12) > déc. 24 09:39:33 stream kernel: hv_netvsc > 9538b269-5961-4c95-aa0b-b2994c468668 enx00155d343101: > RNDIS_MSG_INDICATE (len 20, status 0x4001000c, buf len 0, buf offset > 0) > déc. 24 09:39:33 stream kernel: hv_netvsc > 9538b269-5961-4c95-aa0b-b2994c468668 enx00155d343101: > RNDIS_MSG_INDICATE (len 20, status 0x4001000c, buf len 0, buf offset > 0) > déc. 24 09:39:33 stream kernel: hv_netvsc > 9538b269-5961-4c95-aa0b-b2994c468668 enx00155d343101: > RNDIS_MSG_INDICATE (len 20, status 0x4001000b, buf len 0, buf offset > 0) > déc. 24 09:39:33 stream kernel: hv_netvsc > 9538b269-5961-4c95-aa0b-b2994c468668 enx00155d343101: > RNDIS_MSG_INDICATE (len 20, status 0x4001000b, buf len 0, buf offset > 0) > déc. 24 09:39:33 stream kernel: hv_netvsc > 9538b269-5961-4c95-aa0b-b2994c468668 enx00155d343101: > RNDIS_MSG_INDICATE (len 176, status 0x40020006, buf len 156, buf > offset 12) > déc. 24 09:39:33 stream kernel: hv_netvsc > 9538b269-5961-4c95-aa0b-b2994c468668 enx00155d343101: > RNDIS_MSG_INDICATE (len 176, status 0x40020006, buf len 156, buf > offset 12) > déc. 24 09:39:33 stream kernel: hv_netvsc > 9538b269-5961-4c95-aa0b-b2994c468668 enx00155d343101: > RNDIS_MSG_INDICATE (len 20, status 0x4001000c, buf len 0, buf offset > 0) > déc. 24 09:39:33 stream kernel: hv_netvsc > 9538b269-5961-4c95-aa0b-b2994c468668 enx00155d343101: > RNDIS_MSG_INDICATE (len 20, status 0x4001000c, buf len 0, buf offset > 0) > déc. 24 09:39:33 stream kernel: hv_netvsc > 9538b269-5961-4c95-aa0b-b2994c468668 enx00155d343101: > RNDIS_MSG_INDICATE (len 20, status 0x4001000b, buf len 0, buf offset > 0) > déc. 24 09:39:33 stream kernel: hv_netvsc > 9538b269-5961-4c95-aa0b-b2994c468668 enx00155d343101: > RNDIS_MSG_INDICATE (len 20, status 0x4001000b, buf len 0, buf offset > 0) > déc. 24 09:39:33 stream kernel: hv_netvsc > 9538b269-5961-4c95-aa0b-b2994c468668 enx00155d343101: > RNDIS_MSG_INDICATE (len 176, status 0x40020006, buf len 156, buf > offset 12) > déc. 24 09:39:33 stream kernel: hv_netvsc > 9538b269-5961-4c95-aa0b-b2994c468668 enx00155d343101: > RNDIS_MSG_INDICATE (len 176, status 0x40020006, buf len 156, buf > offset 12) > déc. 24 09:39:33 stream kernel: hv_netvsc > 9538b269-5961-4c95-aa0b-b2994c468668 enx00155d343101: > RNDIS_MSG_INDICATE (len 20, status 0x4001000c, buf len 0, buf offset > 0) > déc. 24 09:39:33 stream kernel: hv_netvsc > 9538b269-5961-4c95-aa0b-b2994c468668 enx00155d343101: > RNDIS_MSG_INDICATE (len 20, status 0x4001000c, buf len 0, buf offset > 0) > déc. 24 09:39:33 stream kernel: hv_netvsc > 9538b269-5961-4c95-aa0b-b2994c468668 enx00155d343101: > RNDIS_MSG_INDICATE (len 20, status 0x4001000b, buf len 0, buf offset > 0) > déc. 24 09:39:33 stream kernel: hv_netvsc > 9538b269-5961-4c95-aa0b-b2994c468668 enx00155d343101: > RNDIS_MSG_INDICATE (len 20, status 0x4001000b, buf len 0, buf offset > 0) > déc. 24 09:39:33 stream kernel: hv_netvsc > 9538b269-5961-4c95-aa0b-b2994c468668 enx00155d343101: > RNDIS_MSG_INDICATE (len 176, status 0x40020006, buf len 156, buf > offset 12) > déc. 24 09:39:33 stream kernel: hv_netvsc > 9538b269-5961-4c95-aa0b-b2994c468668 enx00155d343101: > RNDIS_MSG_INDICATE (len 176, status 0x40020006, buf len 156, buf > offset 12) > déc. 24 09:39:33 stream kernel: hv_netvsc > 9538b269-5961-4c95-aa0b-b2994c468668 enx00155d343101: > RNDIS_MSG_INDICATE (len 20, status 0x4001000c, buf len 0, buf offset > 0) > déc. 24 09:39:33 stream kernel: hv_netvsc > 9538b269-5961-4c95-aa0b-b2994c468668 enx00155d343101: > RNDIS_MSG_INDICATE (len 20, status 0x4001000c, buf len 0, buf offset > 0) > déc. 24 09:39:33 stream kernel: hv_netvsc > 9538b269-5961-4c95-aa0b-b2994c468668 enx00155d343101: > RNDIS_MSG_INDICATE (len 20, status 0x4001000b, buf len 0, buf offset > 0) > déc. 24 09:39:33 stream kernel: hv_netvsc > 9538b269-5961-4c95-aa0b-b2994c468668 enx00155d343101: > RNDIS_MSG_INDICATE (len 20, status 0x4001000b, buf len 0, buf offset > 0) > déc. 24 09:39:33 stream kernel: hv_netvsc > 9538b269-5961-4c95-aa0b-b2994c468668 enx00155d343101: > RNDIS_MSG_INDICATE (len 176, status 0x40020006, buf len 156, buf > offset 12) > déc. 24 09:39:33 stream kernel: hv_netvsc > 9538b269-5961-4c95-aa0b-b2994c468668 enx00155d343101: > RNDIS_MSG_INDICATE (len 176, status 0x40020006, buf len 156, buf > offset 12) > déc. 24 09:39:33 stream kernel: hv_netvsc > 9538b269-5961-4c95-aa0b-b2994c468668 enx00155d343101: > RNDIS_MSG_INDICATE (len 20, status 0x4001000c, buf len 0, buf offset > 0) > déc. 24 09:39:33 stream kernel: hv_netvsc > 9538b269-5961-4c95-aa0b-b2994c468668 enx00155d343101: > RNDIS_MSG_INDICATE (len 20, status 0x4001000c, buf len 0, buf offset > 0) > déc. 24 09:39:33 stream kernel: hv_netvsc > 9538b269-5961-4c95-aa0b-b2994c468668 enx00155d343101: > RNDIS_MSG_INDICATE (len 20, status 0x4001000b, buf len 0, buf offset > 0) > déc. 24 09:39:33 stream kernel: hv_netvsc > 9538b269-5961-4c95-aa0b-b2994c468668 enx00155d343101: > RNDIS_MSG_INDICATE (len 20, status 0x4001000b, buf len 0, buf offset > 0) > déc. 24 09:39:33 stream kernel: hv_netvsc > 9538b269-5961-4c95-aa0b-b2994c468668 enx00155d343101: > RNDIS_MSG_INDICATE (len 176, status 0x40020006, buf len 156, buf > offset 12) > déc. 24 09:39:37 stream NetworkManager[1013]: <trace> > [1703407177.2456] platform-linux: event-notification: RTM_NEWLINK, > flags 0, seq 0: 2: enx00155d343101 > <UP,LOWER_UP;broadcast,multicast,up,running,lowerup> mtu 1500 arp 1 > ethernet? >déc. 24 09:39:37 stream NetworkManager[1013]: <debug> > [1703407177.2457] platform: (enx00155d343101) signal: link changed: 2: > enx00155d343101 <UP,LOWER_UP;broadcast,multicast,up,running,lowerup> > mtu 1500 arp 1 ethernet? init addrgenmod>déc. 24 09:39:37 stream > NetworkManager[1013]: <trace> [1703407177.2457] > l3cfg[17837add519934e3,ifindex=2]: emit signal (platform-change, > obj-type=link, change=changed, obj=2: enx00155d343101 > <UP,LOWER_UP;broadcast,multicast,up,running>déc. 24 09:39:37 stream > NetworkManager[1013]: <debug> [1703407177.2458] > device[cf06ffc422da9956] (enx00155d343101): queued link change for > ifindex 2 > déc. 24 09:39:37 stream NetworkManager[1013]: <info> > [1703407177.2460] device (enx00155d343101): carrier: link connected > déc. 24 09:39:37 stream NetworkManager[1013]: <debug> > [1703407177.2461] device[cf06ffc422da9956] (enx00155d343101): carrier: > link disconnected (canceling deferred action) > déc. 24 09:39:37 stream NetworkManager[1013]: <trace> > [1703407177.2462] ethtool[2]: ETHTOOL_GSET, enx00155d343101: success > déc. 24 09:39:39 stream NetworkManager[1013]: <trace> > [1703407179.2935] platform-linux: event-notification: RTM_NEWLINK, > flags 0, seq 0: 2: enx00155d343101 > <UP,LOWER_UP;broadcast,multicast,up,running,lowerup> mtu 1500 arp 1 > ethernet? >déc. 24 09:39:39 stream NetworkManager[1013]: <debug> > [1703407179.2936] platform: (enx00155d343101) signal: link changed: 2: > enx00155d343101 <UP,LOWER_UP;broadcast,multicast,up,running,lowerup> > mtu 1500 arp 1 ethernet? init addrgenmod>déc. 24 09:39:39 stream > NetworkManager[1013]: <trace> [1703407179.2936] > l3cfg[17837add519934e3,ifindex=2]: emit signal (platform-change, > obj-type=link, change=changed, obj=2: enx00155d343101 > <UP,LOWER_UP;broadcast,multicast,up,running>déc. 24 09:39:39 stream > NetworkManager[1013]: <debug> [1703407179.2936] > device[cf06ffc422da9956] (enx00155d343101): queued link change for > ifindex 2 > déc. 24 09:39:39 stream NetworkManager[1013]: <trace> > [1703407179.2936] platform-linux: event-notification: RTM_NEWLINK, > flags 0, seq 0: 2: enx00155d343101 > <UP,LOWER_UP;broadcast,multicast,up,running,lowerup> mtu 1500 arp 1 > ethernet? >déc. 24 09:39:41 stream NetworkManager[1013]: <trace> > [1703407181.3417] platform-linux: event-notification: RTM_NEWLINK, > flags 0, seq 0: 2: enx00155d343101 <UP;broadcast,multicast,up> mtu > 1500 arp 1 ethernet? not-init addrgenmode none>déc. 24 09:39:41 stream > NetworkManager[1013]: <debug> [1703407181.3418] platform: > (enx00155d343101) signal: link changed: 2: enx00155d343101 > <UP;broadcast,multicast,up> mtu 1500 arp 1 ethernet? init addrgenmode > none addr 00:15:5D:34:3>déc. 24 09:39:41 stream NetworkManager[1013]: > <trace> [1703407181.3418] l3cfg[17837add519934e3,ifindex=2]: emit > signal (platform-change, obj-type=link, change=changed, obj=2: > enx00155d343101 <UP;broadcast,multicast,up> mtu 1500 arp 1 >déc. 24 > 09:39:41 stream NetworkManager[1013]: <debug> [1703407181.3418] > device[cf06ffc422da9956] (enx00155d343101): queued link change for > ifindex 2 > déc. 24 09:39:41 stream NetworkManager[1013]: <debug> > [1703407181.3424] device[cf06ffc422da9956] (enx00155d343101): carrier: > link disconnected (deferring action for 6000 milliseconds) > déc. 24 09:39:45 stream NetworkManager[1013]: <trace> > [1703407185.4376] platform-linux: event-notification: RTM_NEWLINK, > flags 0, seq 0: 2: enx00155d343101 > <UP,LOWER_UP;broadcast,multicast,up,running,lowerup> mtu 1500 arp 1 > ethernet? >déc. 24 09:39:45 stream NetworkManager[1013]: <debug> > [1703407185.4377] platform: (enx00155d343101) signal: link changed: 2: > enx00155d343101 <UP,LOWER_UP;broadcast,multicast,up,running,lowerup> > mtu 1500 arp 1 ethernet? init addrgenmod>déc. 24 09:39:45 stream > NetworkManager[1013]: <trace> [1703407185.4377] > l3cfg[17837add519934e3,ifindex=2]: emit signal (platform-change, > obj-type=link, change=changed, obj=2: enx00155d343101 > <UP,LOWER_UP;broadcast,multicast,up,running>déc. 24 09:39:45 stream > NetworkManager[1013]: <debug> [1703407185.4377] > device[cf06ffc422da9956] (enx00155d343101): queued link change for > ifindex 2 > déc. 24 09:39:45 stream NetworkManager[1013]: <info> > [1703407185.4380] device (enx00155d343101): carrier: link connected > déc. 24 09:39:45 stream NetworkManager[1013]: <debug> > [1703407185.4381] device[cf06ffc422da9956] (enx00155d343101): carrier: > link disconnected (canceling deferred action) > déc. 24 09:39:45 stream NetworkManager[1013]: <trace> > [1703407185.4382] ethtool[2]: ETHTOOL_GSET, enx00155d343101: success > ... > déc. 24 09:39:53 stream NetworkManager[1013]: <info> > [1703407193.6298] device (enx00155d343101): carrier: link connected > ... > déc. 24 09:40:01 stream NetworkManager[1013]: <info> > [1703407201.8219] device (enx00155d343101): carrier: link connected > ... > déc. 24 09:40:10 stream NetworkManager[1013]: <info> > [1703407210.0138] device (enx00155d343101): carrier: link connected > ... > déc. 24 09:40:18 stream NetworkManager[1013]: <info> > [1703407218.2059] device (enx00155d343101): carrier: link connected > ---- > > while Windows events show: > > ---- > Get-WinEvent -LogName Microsoft-Windows-Hyper-V-VmSwitch-Operational > -MaxEvents 50 -FilterXPath "*[System[Level<5]]" > > ProviderName: Microsoft-Windows-Hyper-V-VmSwitch > > TimeCreated Id LevelDisplayName Message > ----------- -- ---------------- ------- > 24/12/2023 09:39:33 220 Information Status change > (IPSEC Disable) sent to Nic > 40DBAAF6-D408-452F-BC2E-B76AAF065732--B670C9DF-AB50-49C4-... > 24/12/2023 09:39:33 220 Information Status change > (Nic Connected) sent to Nic > 40DBAAF6-D408-452F-BC2E-B76AAF065732--B670C9DF-AB50-49C4-... > 24/12/2023 09:39:33 220 Information Status change > (Nic Connected) sent to Nic > 40DBAAF6-D408-452F-BC2E-B76AAF065732--B670C9DF-AB50-49C4-... > 24/12/2023 09:39:33 220 Information Status change > (Nic Disconnected) sent to Nic > 40DBAAF6-D408-452F-BC2E-B76AAF065732--B670C9DF-AB50-49... > 24/12/2023 09:39:33 220 Information Status change > (Nic Disconnected) sent to Nic > 40DBAAF6-D408-452F-BC2E-B76AAF065732--B670C9DF-AB50-49... > 24/12/2023 09:39:33 220 Information Status change > (IPSEC Disable) sent to Nic > 40DBAAF6-D408-452F-BC2E-B76AAF065732--B670C9DF-AB50-49C4-... > 24/12/2023 09:39:33 220 Information Status change > (IPSEC Disable) sent to Nic > 40DBAAF6-D408-452F-BC2E-B76AAF065732--B670C9DF-AB50-49C4-... > 24/12/2023 09:39:33 220 Information Status change > (Nic Connected) sent to Nic > 40DBAAF6-D408-452F-BC2E-B76AAF065732--B670C9DF-AB50-49C4-... > 24/12/2023 09:39:33 220 Information Status change > (Nic Connected) sent to Nic > 40DBAAF6-D408-452F-BC2E-B76AAF065732--B670C9DF-AB50-49C4-... > 24/12/2023 09:39:33 220 Information Status change > (Nic Disconnected) sent to Nic > 40DBAAF6-D408-452F-BC2E-B76AAF065732--B670C9DF-AB50-49... > 24/12/2023 09:39:33 220 Information Status change > (Nic Disconnected) sent to Nic > 40DBAAF6-D408-452F-BC2E-B76AAF065732--B670C9DF-AB50-49... > 24/12/2023 09:39:33 220 Information Status change > (IPSEC Disable) sent to Nic > 40DBAAF6-D408-452F-BC2E-B76AAF065732--B670C9DF-AB50-49C4-... > 24/12/2023 09:39:33 220 Information Status change > (IPSEC Disable) sent to Nic > 40DBAAF6-D408-452F-BC2E-B76AAF065732--B670C9DF-AB50-49C4-... > 24/12/2023 09:39:33 220 Information Status change > (Nic Connected) sent to Nic > 40DBAAF6-D408-452F-BC2E-B76AAF065732--B670C9DF-AB50-49C4-... > 24/12/2023 09:39:33 220 Information Status change > (Nic Disconnected) sent to Nic > 40DBAAF6-D408-452F-BC2E-B76AAF065732--B670C9DF-AB50-49... > 24/12/2023 09:39:33 220 Information Status change > (Nic Disconnected) sent to Nic > 40DBAAF6-D408-452F-BC2E-B76AAF065732--B670C9DF-AB50-49... > 24/12/2023 09:39:33 220 Information Status change > (IPSEC Disable) sent to Nic > 40DBAAF6-D408-452F-BC2E-B76AAF065732--B670C9DF-AB50-49C4-... > 24/12/2023 09:39:33 220 Information Status change > (IPSEC Disable) sent to Nic > 40DBAAF6-D408-452F-BC2E-B76AAF065732--B670C9DF-AB50-49C4-... > 24/12/2023 09:39:33 220 Information Status change > (Nic Connected) sent to Nic > 40DBAAF6-D408-452F-BC2E-B76AAF065732--B670C9DF-AB50-49C4-... > 24/12/2023 09:39:33 220 Information Status change > (Nic Connected) sent to Nic > 40DBAAF6-D408-452F-BC2E-B76AAF065732--B670C9DF-AB50-49C4-... > 24/12/2023 09:39:33 220 Information Status change > (Nic Disconnected) sent to Nic > 40DBAAF6-D408-452F-BC2E-B76AAF065732--B670C9DF-AB50-49... > 24/12/2023 09:39:33 220 Information Status change > (Nic Disconnected) sent to Nic > 40DBAAF6-D408-452F-BC2E-B76AAF065732--B670C9DF-AB50-49... > 24/12/2023 09:39:33 220 Information Status change > (IPSEC Disable) sent to Nic > 40DBAAF6-D408-452F-BC2E-B76AAF065732--B670C9DF-AB50-49C4-... > 24/12/2023 09:39:33 220 Information Status change > (Nic Connected) sent to Nic > 40DBAAF6-D408-452F-BC2E-B76AAF065732--B670C9DF-AB50-49C4-... > 24/12/2023 09:39:33 220 Information Status change > (Nic Connected) sent to Nic > 40DBAAF6-D408-452F-BC2E-B76AAF065732--B670C9DF-AB50-49C4-... > 24/12/2023 09:39:33 220 Information Status change > (Nic Disconnected) sent to Nic > 40DBAAF6-D408-452F-BC2E-B76AAF065732--B670C9DF-AB50-49... > 24/12/2023 09:39:33 220 Information Status change > (Nic Disconnected) sent to Nic > 40DBAAF6-D408-452F-BC2E-B76AAF065732--B670C9DF-AB50-49... > 24/12/2023 09:39:33 220 Information Status change > (IPSEC Disable) sent to Nic > 40DBAAF6-D408-452F-BC2E-B76AAF065732--B670C9DF-AB50-49C4-... > 24/12/2023 09:39:33 220 Information Status change > (IPSEC Disable) sent to Nic > 40DBAAF6-D408-452F-BC2E-B76AAF065732--B670C9DF-AB50-49C4-... > 24/12/2023 09:39:33 220 Information Status change > (Nic Connected) sent to Nic > 40DBAAF6-D408-452F-BC2E-B76AAF065732--B670C9DF-AB50-49C4-... > 24/12/2023 09:39:33 220 Information Status change > (Nic Connected) sent to Nic > 40DBAAF6-D408-452F-BC2E-B76AAF065732--B670C9DF-AB50-49C4-... > 24/12/2023 09:39:33 220 Information Status change > (Nic Disconnected) sent to Nic > 40DBAAF6-D408-452F-BC2E-B76AAF065732--B670C9DF-AB50-49... > 24/12/2023 09:39:33 220 Information Status change > (Nic Disconnected) sent to Nic > 40DBAAF6-D408-452F-BC2E-B76AAF065732--B670C9DF-AB50-49... > 24/12/2023 09:39:33 220 Information Status change > (IPSEC Disable) sent to Nic > 40DBAAF6-D408-452F-BC2E-B76AAF065732--B670C9DF-AB50-49C4-... > ---- > > It seems there is a quick succession of disconnections and > reconnections. > On the kernel side there seems to be a delay of 2s imposed for each of > these, so I applied this patch, as a proof of concept, to workaround > the issue: > > ---- > --- a/drivers/net/hyperv/netvsc_drv.c > +++ b/drivers/net/hyperv/netvsc_drv.c > @@ -39,7 +39,7 @@ > > #define RING_SIZE_MIN 64 > > -#define LINKCHANGE_INT (2 * HZ) > +#define LINKCHANGE_INT (2 * HZ / 100) > #define VF_TAKEOVER_INT (HZ / 10) > > static unsigned int ring_size __ro_after_init = 128; > ---- > > which works great. Do you know if there is a real need for a 2s delay > for link change? > I experienced this issue on all the Linux VMs I booted on my laptop, > although I'm primarily running Centos Stream9. > (I reported the issue there without much luck > https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fissues. > redhat.com%2Fbrowse%2FRHEL- > 20224&data=05%7C02%7Chaiyangz%40microsoft.com%7Ce5b6421762ec4be868ca08dc5 > ca66de1%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C638487117095524688%7 > CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haW > wiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=oxfowwcsFjInwAnfTQt6PNMgz8ItJKCq%2FBV > Cpv8D4SA%3D&reserved=0, ticket is private) > > Thanks! > Francois The 2 seconds delay is necessary for the upper layers, like link_watch infrastructure, and userspace to handle the status change properly. See the following patch for more details: https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/commit/?id=27a70af3f4cf633a1b86c0ac7b426e2fe16ad2e5 author Vitaly Kuznetsov <vkuznets@xxxxxxxxxx> 2015-11-27 11:39:55 +0100 committer David S. Miller <davem@xxxxxxxxxxxxx> 2015-12-01 14:58:07 -0500 commit 27a70af3f4cf633a1b86c0ac7b426e2fe16ad2e5 (patch) tree e4dc499878da293844034dc90d2894189ae2bda6 parent 77b75f4d8cf105b599beef38724f8171e557919d (diff) download net-27a70af3f4cf633a1b86c0ac7b426e2fe16ad2e5.tar.gz hv_netvsc: rework link status change handling There are several issues in hv_netvsc driver with regards to link status change handling: - RNDIS_STATUS_NETWORK_CHANGE results in calling userspace helper doing '/etc/init.d/network restart' and this is inappropriate and broken for many reasons. - link_watch infrastructure only sends one notification per second and in case of e.g. paired disconnect/connect events we get only one notification with last status. This makes it impossible to handle such situations in userspace. Redo link status changes handling in the following way: - Create a list of reconfig events in network device context. - On a reconfig event add it to the list of events and schedule netvsc_link_change(). - In netvsc_link_change() ensure 2-second delay between link status changes. - Handle RNDIS_STATUS_NETWORK_CHANGE as a paired disconnect/connect event. Thanks, - Haiyang