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://issues.redhat.com/browse/RHEL-20224, ticket is private) Thanks! Francois