Changeset 87767 in vbox for trunk/src/VBox/Devices/Network
- Timestamp:
- Feb 16, 2021 4:41:18 PM (4 years ago)
- Location:
- trunk/src/VBox/Devices/Network
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/DevE1000.cpp
r87760 r87767 2191 2191 uint64_t tsNow = PDMDevHlpTimerGet(pDevIns, pThis->hIntTimer); 2192 2192 if (!!ITR && tsNow - pThis->u64AckedAt < ITR * 256 2193 2193 && pThis->fItrEnabled && (pThis->fItrRxEnabled || !(ICR & ICR_RXT0))) 2194 2194 { 2195 2195 E1K_INC_ISTAT_CNT(pThis->uStatIntEarly); … … 3509 3509 # ifdef E1K_TX_DELAY 3510 3510 /** 3511 * Transmit Delay Timer handler. 3512 * 3513 * @remarks We only get here when the timer expires. 3514 * 3515 * @param pDevIns Pointer to device instance structure. 3516 * @param pTimer Pointer to the timer. 3517 * @param pvUser NULL. 3518 * @thread EMT 3519 */ 3520 static DECLCALLBACK(void) e1kR3TxDelayTimer(PPDMDEVINS pDevIns, PTMTIMER pTimer, void *pvUser) 3511 * @callback_method_impl{FNTMTIMERDEV, Transmit Delay Timer handler.} 3512 */ 3513 static DECLCALLBACK(void) e1kR3TxDelayTimer(PPDMDEVINS pDevIns, TMTIMERHANDLE hTimer, void *pvUser) 3521 3514 { 3522 3515 PE1KSTATE pThis = (PE1KSTATE)pvUser; 3523 3516 Assert(PDMCritSectIsOwner(&pThis->csTx)); 3517 RT_NOREF(hTimer); 3524 3518 3525 3519 E1K_INC_ISTAT_CNT(pThis->uStatTxDelayExp); … … 3537 3531 3538 3532 /** 3539 * Transmit Interrupt Delay Timer handler. 3540 * 3541 * @remarks We only get here when the timer expires. 3542 * 3543 * @param pDevIns Pointer to device instance structure. 3544 * @param pTimer Pointer to the timer. 3545 * @param pvUser NULL. 3546 * @thread EMT 3547 */ 3548 static DECLCALLBACK(void) e1kR3TxIntDelayTimer(PPDMDEVINS pDevIns, PTMTIMER pTimer, void *pvUser) 3549 { 3550 RT_NOREF(pDevIns); 3551 RT_NOREF(pTimer); 3533 * @callback_method_impl{FNTMTIMERDEV, Transmit Interrupt Delay Timer handler.} 3534 */ 3535 static DECLCALLBACK(void) e1kR3TxIntDelayTimer(PPDMDEVINS pDevIns, TMTIMERHANDLE hTimer, void *pvUser) 3536 { 3552 3537 PE1KSTATE pThis = (PE1KSTATE)pvUser; 3538 Assert(hTimer == pThis->hTIDTimer); RT_NOREF(hTimer); 3553 3539 3554 3540 E1K_INC_ISTAT_CNT(pThis->uStatTID); … … 3561 3547 3562 3548 /** 3563 * Transmit Absolute Delay Timer handler. 3564 * 3565 * @remarks We only get here when the timer expires. 3566 * 3567 * @param pDevIns Pointer to device instance structure. 3568 * @param pTimer Pointer to the timer. 3569 * @param pvUser NULL. 3570 * @thread EMT 3571 */ 3572 static DECLCALLBACK(void) e1kR3TxAbsDelayTimer(PPDMDEVINS pDevIns, PTMTIMER pTimer, void *pvUser) 3573 { 3574 RT_NOREF(pDevIns); 3575 RT_NOREF(pTimer); 3549 * @callback_method_impl{FNTMTIMERDEV, Transmit Absolute Delay Timer handler.} 3550 */ 3551 static DECLCALLBACK(void) e1kR3TxAbsDelayTimer(PPDMDEVINS pDevIns, TMTIMERHANDLE hTimer, void *pvUser) 3552 { 3576 3553 PE1KSTATE pThis = (PE1KSTATE)pvUser; 3554 Assert(hTimer == pThis->hTADTimer); RT_NOREF(hTimer); 3577 3555 3578 3556 E1K_INC_ISTAT_CNT(pThis->uStatTAD); … … 3586 3564 3587 3565 /** 3588 * Receive Interrupt Delay Timer handler. 3589 * 3590 * @remarks We only get here when the timer expires. 3591 * 3592 * @param pDevIns Pointer to device instance structure. 3593 * @param pTimer Pointer to the timer. 3594 * @param pvUser NULL. 3595 * @thread EMT 3596 */ 3597 static DECLCALLBACK(void) e1kR3RxIntDelayTimer(PPDMDEVINS pDevIns, PTMTIMER pTimer, void *pvUser) 3566 * @callback_method_impl{FNTMTIMERDEV, Receive Interrupt Delay Timer handler.} 3567 */ 3568 static DECLCALLBACK(void) e1kR3RxIntDelayTimer(PPDMDEVINS pDevIns, TMTIMERHANDLE hTimer, void *pvUser) 3598 3569 { 3599 3570 PE1KSTATE pThis = (PE1KSTATE)pvUser; 3571 Assert(hTimer == pThis->hRIDTimer); RT_NOREF(hTimer); 3600 3572 3601 3573 E1K_INC_ISTAT_CNT(pThis->uStatRID); … … 3606 3578 3607 3579 /** 3608 * Receive Absolute Delay Timer handler. 3609 * 3610 * @remarks We only get here when the timer expires. 3611 * 3612 * @param pDevIns Pointer to device instance structure. 3613 * @param pTimer Pointer to the timer. 3614 * @param pvUser NULL. 3615 * @thread EMT 3616 */ 3617 static DECLCALLBACK(void) e1kR3RxAbsDelayTimer(PPDMDEVINS pDevIns, PTMTIMER pTimer, void *pvUser) 3580 * @callback_method_impl{FNTMTIMERDEV, Receive Absolute Delay Timer handler.} 3581 */ 3582 static DECLCALLBACK(void) e1kR3RxAbsDelayTimer(PPDMDEVINS pDevIns, TMTIMERHANDLE hTimer, void *pvUser) 3618 3583 { 3619 3584 PE1KSTATE pThis = (PE1KSTATE)pvUser; 3585 Assert(hTimer == pThis->hRADTimer); RT_NOREF(hTimer); 3620 3586 3621 3587 E1K_INC_ISTAT_CNT(pThis->uStatRAD); … … 3628 3594 3629 3595 /** 3630 * Late Interrupt Timer handler. 3631 * 3632 * @param pDevIns Pointer to device instance structure. 3633 * @param pTimer Pointer to the timer. 3634 * @param pvUser NULL. 3635 * @thread EMT 3636 */ 3637 static DECLCALLBACK(void) e1kR3LateIntTimer(PPDMDEVINS pDevIns, PTMTIMER pTimer, void *pvUser) 3638 { 3639 RT_NOREF(pDevIns, pTimer); 3596 * @callback_method_impl{FNTMTIMERDEV, Late Interrupt Timer handler.} 3597 */ 3598 static DECLCALLBACK(void) e1kR3LateIntTimer(PPDMDEVINS pDevIns, TMTIMERHANDLE hTimer, void *pvUser) 3599 { 3640 3600 PE1KSTATE pThis = (PE1KSTATE)pvUser; 3601 Assert(hTimer == pThis->hIntTimer); RT_NOREF(hTimer); 3602 RT_NOREF(hTimer); 3641 3603 3642 3604 STAM_PROFILE_ADV_START(&pThis->StatLateIntTimer, a); … … 3652 3614 3653 3615 /** 3654 * Link Up Timer handler. 3655 * 3656 * @param pDevIns Pointer to device instance structure. 3657 * @param pTimer Pointer to the timer. 3658 * @param pvUser NULL. 3659 * @thread EMT 3660 */ 3661 static DECLCALLBACK(void) e1kR3LinkUpTimer(PPDMDEVINS pDevIns, PTMTIMER pTimer, void *pvUser) 3662 { 3663 RT_NOREF(pTimer); 3616 * @callback_method_impl{FNTMTIMERDEV, Link Up Timer handler.} 3617 */ 3618 static DECLCALLBACK(void) e1kR3LinkUpTimer(PPDMDEVINS pDevIns, TMTIMERHANDLE hTimer, void *pvUser) 3619 { 3664 3620 PE1KSTATE pThis = (PE1KSTATE)pvUser; 3665 3621 PE1KSTATECC pThisCC = PDMDEVINS_2_DATA_CC(pDevIns, PE1KSTATECC); 3622 Assert(hTimer == pThis->hLUTimer); RT_NOREF(hTimer); 3666 3623 3667 3624 /* -
trunk/src/VBox/Devices/Network/DevPCNet.cpp
r87760 r87767 4009 4009 * @callback_method_impl{FNTMTIMERDEV, Poll timer} 4010 4010 */ 4011 static DECLCALLBACK(void) pcnetR3Timer(PPDMDEVINS pDevIns, PTMTIMER pTimer, void *pvUser)4011 static DECLCALLBACK(void) pcnetR3Timer(PPDMDEVINS pDevIns, TMTIMERHANDLE hTimer, void *pvUser) 4012 4012 { 4013 4013 PPCNETSTATE pThis = PDMDEVINS_2_DATA(pDevIns, PPCNETSTATE); 4014 4014 PPCNETSTATECC pThisCC = PDMDEVINS_2_DATA_CC(pDevIns, PPCNETSTATECC); 4015 4015 Assert(PDMDevHlpCritSectIsOwner(pDevIns, &pThis->CritSect)); 4016 RT_NOREF(pvUser, pTimer);4016 Assert(hTimer == pThis->hTimerPoll); RT_NOREF(pvUser, hTimer); 4017 4017 4018 4018 STAM_PROFILE_ADV_START(&pThis->StatTimer, a); … … 4026 4026 * Software interrupt timer callback function.} 4027 4027 */ 4028 static DECLCALLBACK(void) pcnetR3TimerSoftInt(PPDMDEVINS pDevIns, PTMTIMER pTimer, void *pvUser)4028 static DECLCALLBACK(void) pcnetR3TimerSoftInt(PPDMDEVINS pDevIns, TMTIMERHANDLE hTimer, void *pvUser) 4029 4029 { 4030 4030 PPCNETSTATE pThis = PDMDEVINS_2_DATA(pDevIns, PPCNETSTATE); 4031 4031 Assert(PDMDevHlpCritSectIsOwner(pDevIns, &pThis->CritSect)); 4032 RT_NOREF(pvUser, pTimer);4032 Assert(hTimer == pThis->hTimerSoftInt); RT_NOREF(pvUser, hTimer); 4033 4033 4034 4034 pThis->aCSR[7] |= 0x0800; /* STINT */ … … 4045 4045 * should be considered lost. 4046 4046 */ 4047 static DECLCALLBACK(void) pcnetR3TimerRestore(PPDMDEVINS pDevIns, PTMTIMER pTimer, void *pvUser)4047 static DECLCALLBACK(void) pcnetR3TimerRestore(PPDMDEVINS pDevIns, TMTIMERHANDLE hTimer, void *pvUser) 4048 4048 { 4049 4049 PPCNETSTATE pThis = PDMDEVINS_2_DATA(pDevIns, PPCNETSTATE); 4050 RT_NOREF(pTimer,pvUser);4050 Assert(hTimer == pThis->hTimerRestore); RT_NOREF(pvUser); 4051 4051 4052 4052 int rc = PDMDevHlpCritSectEnter(pDevIns, &pThis->CritSect, VERR_SEM_BUSY); … … 4056 4056 if (pThis->cLinkDownReported <= PCNET_MAX_LINKDOWN_REPORTED) 4057 4057 { 4058 rc = PDMDevHlpTimerSetMillies(pDevIns, pThis->hTimerRestore, 1500);4058 rc = PDMDevHlpTimerSetMillies(pDevIns, hTimer, 1500); 4059 4059 AssertRC(rc); 4060 4060 } -
trunk/src/VBox/Devices/Network/DevVirtioNet.cpp
r87760 r87767 625 625 * @callback_method_impl{FNTMTIMERDEV, Link Up Timer handler.} 626 626 */ 627 static DECLCALLBACK(void) vnetR3LinkUpTimer(PPDMDEVINS pDevIns, PTMTIMER pTimer, void *pvUser)627 static DECLCALLBACK(void) vnetR3LinkUpTimer(PPDMDEVINS pDevIns, TMTIMERHANDLE hTimer, void *pvUser) 628 628 { 629 629 PVNETSTATE pThis = PDMDEVINS_2_DATA(pDevIns, PVNETSTATE); 630 630 PVNETSTATECC pThisCC = PDMDEVINS_2_DATA_CC(pDevIns, PVNETSTATECC); 631 RT_NOREF( pTimer, pvUser);631 RT_NOREF(hTimer, pvUser); 632 632 633 633 int rc = vnetR3CsEnter(pDevIns, pThis, VERR_SEM_BUSY); … … 1509 1509 * @callback_method_impl{FNTMTIMERDEV, Transmit Delay Timer handler.} 1510 1510 */ 1511 static DECLCALLBACK(void) vnetR3TxTimer(PPDMDEVINS pDevIns, PTMTIMER pTimer, void *pvUser)1511 static DECLCALLBACK(void) vnetR3TxTimer(PPDMDEVINS pDevIns, TMTIMERHANDLE hTimer, void *pvUser) 1512 1512 { 1513 1513 PVNETSTATE pThis = PDMDEVINS_2_DATA(pDevIns, PVNETSTATE); 1514 1514 PVNETSTATECC pThisCC = PDMDEVINS_2_DATA_CC(pDevIns, PVNETSTATECC); 1515 RT_NOREF( pTimer, pvUser);1515 RT_NOREF(hTimer, pvUser); 1516 1516 1517 1517 uint32_t u32MicroDiff = (uint32_t)((RTTimeNanoTS() - pThis->u64NanoTS) / 1000); … … 1527 1527 // Log3(("%s vnetR3TxTimer: Expired\n", INSTANCE(pThis))); 1528 1528 vnetR3TransmitPendingPackets(pDevIns, pThis, pThisCC, pThisCC->pTxQueue, false /*fOnWorkerThread*/); 1529 if (RT_FAILURE(vnetR3CsEnter(pDevIns, pThis, VERR_SEM_BUSY))) 1530 { 1531 LogRel(("vnetR3TxTimer: Failed to enter critical section!/n")); 1532 return; 1533 } 1529 int rc = vnetR3CsEnter(pDevIns, pThis, VERR_SEM_BUSY) 1530 AssertLogRelRCReturnVoid(rc); 1534 1531 vringSetNotification(pDevIns, &pThisCC->pTxQueue->VRing, true); 1535 1532 vnetR3CsLeave(pDevIns, pThis); -
trunk/src/VBox/Devices/Network/DevVirtioNet_1_0.cpp
r87760 r87767 2446 2446 * @callback_method_impl{FNTMTIMERDEV, Link Up Timer handler.} 2447 2447 */ 2448 static DECLCALLBACK(void) virtioNetR3LinkUpTimer(PPDMDEVINS pDevIns, PTMTIMER pTimer, void *pvUser)2448 static DECLCALLBACK(void) virtioNetR3LinkUpTimer(PPDMDEVINS pDevIns, TMTIMERHANDLE hTimer, void *pvUser) 2449 2449 { 2450 2450 PVIRTIONET pThis = PDMDEVINS_2_DATA(pDevIns, PVIRTIONET); 2451 2451 PVIRTIONETCC pThisCC = PDMDEVINS_2_DATA_CC(pDevIns, PVIRTIONETCC); 2452 RT_NOREF( pTimer, pvUser);2452 RT_NOREF(hTimer, pvUser); 2453 2453 2454 2454 SET_LINK_UP(pThis);
Note:
See TracChangeset
for help on using the changeset viewer.