Changeset 91069 in vbox for trunk/src/VBox/Devices/Network
- Timestamp:
- Sep 1, 2021 4:47:14 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/DevVirtioNet.cpp
r90447 r91069 652 652 VNET_R3_CS_ENTER_RETURN_VOID(pDevIns, pThis); 653 653 654 pThis->config.uStatus |= VNET_S_LINK_UP; 655 vnetR3RaiseInterrupt(pDevIns, pThis, VERR_SEM_BUSY, VPCI_ISR_CONFIG); 656 vnetWakeupReceive(pDevIns); 654 Log(("%s vnetR3LinkUpTimer: connected=%s\n", INSTANCE(pThis), vnetR3IsConnected(pDevIns)?"true":"false")); 655 /* Do not bring up the link if the device is not connected. */ 656 if (vnetR3IsConnected(pDevIns)) 657 { 658 pThis->config.uStatus |= VNET_S_LINK_UP; 659 vnetR3RaiseInterrupt(pDevIns, pThis, VERR_SEM_BUSY, VPCI_ISR_CONFIG); 660 vnetWakeupReceive(pDevIns); 661 } 657 662 658 663 vnetR3CsLeave(pDevIns, pThis); … … 1592 1597 Log(("vnetR3TxThread: enable kicking and get to sleep\n")); 1593 1598 vringSetNotification(pDevIns, &pThisCC->pTxQueue->VRing, true); 1594 if (vqueueIsEmpty(pDevIns, pThisCC->pTxQueue)) 1599 /* 1600 * Break out of the loop if the device is not connected. Otherwise we will 1601 * end up in a tight loop, not being able to transmit, if there is something 1602 * in TX queue. See @bugref{10096}. 1603 */ 1604 if (vqueueIsEmpty(pDevIns, pThisCC->pTxQueue) || !vnetR3IsConnected(pDevIns)) 1595 1605 break; 1596 1606 vringSetNotification(pDevIns, &pThisCC->pTxQueue->VRing, false); … … 1999 2009 } 2000 2010 } 2011 Log(("%s State has been restored\n", INSTANCE(pThis))); 2001 2012 2002 2013 return rc; … … 2021 2032 */ 2022 2033 if (!PDMDevHlpVMTeleportedAndNotFullyResumedYet(pDevIns)) 2034 { 2035 /* 2036 * Since we do not restore the link state, we pretend it is up, so it will be 2037 * lowered by vnetR3TempLinkDown, and the guest will be notified. The actual state 2038 * of the link will be determined later by vnetR3IsConnected in vnetR3LinkUpTimer. 2039 * See @bugref{10096}. 2040 */ 2041 pThis->config.uStatus |= VNET_S_LINK_UP; 2023 2042 vnetR3TempLinkDown(pDevIns, pThis, pThisCC); 2043 } 2024 2044 2025 2045 return VINF_SUCCESS;
Note:
See TracChangeset
for help on using the changeset viewer.