Changeset 62962 in vbox
- Timestamp:
- Aug 4, 2016 9:00:52 AM (8 years ago)
- Location:
- trunk/src/VBox/Devices
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/DevE1000.cpp
r62632 r62962 2689 2689 static int e1kRegWriteEECD(PE1KSTATE pThis, uint32_t offset, uint32_t index, uint32_t value) 2690 2690 { 2691 RT_NOREF(offset, index); 2691 2692 #ifdef IN_RING3 2692 2693 /* So far we are concerned with lower byte only */ … … 2707 2708 return VINF_SUCCESS; 2708 2709 #else /* !IN_RING3 */ 2709 RT_NOREF _PV(pThis); RT_NOREF_PV(offset); RT_NOREF_PV(index); RT_NOREF_PV(value);2710 RT_NOREF(pThis, value); 2710 2711 return VINF_IOM_R3_MMIO_WRITE; 2711 2712 #endif /* !IN_RING3 */ … … 3191 3192 3192 3193 #ifdef IN_RING3 3193 #ifdef E1K_TX_DELAY 3194 3194 3195 # ifdef E1K_TX_DELAY 3195 3196 /** 3196 3197 * Transmit Delay Timer handler. … … 3209 3210 3210 3211 E1K_INC_ISTAT_CNT(pThis->uStatTxDelayExp); 3211 # ifdef E1K_INT_STATS3212 # ifdef E1K_INT_STATS 3212 3213 uint64_t u64Elapsed = RTTimeNanoTS() - pThis->u64ArmedAt; 3213 3214 if (u64Elapsed > pThis->uStatMaxTxDelay) 3214 3215 pThis->uStatMaxTxDelay = u64Elapsed; 3215 # endif3216 # endif 3216 3217 int rc = e1kXmitPending(pThis, false /*fOnWorkerThread*/); 3217 3218 AssertMsg(RT_SUCCESS(rc) || rc == VERR_TRY_AGAIN, ("%Rrc\n", rc)); 3218 3219 } 3219 # endif /* E1K_TX_DELAY */3220 3221 # ifdef E1K_USE_TX_TIMERS3220 # endif /* E1K_TX_DELAY */ 3221 3222 # ifdef E1K_USE_TX_TIMERS 3222 3223 3223 3224 /** … … 3237 3238 E1K_INC_ISTAT_CNT(pThis->uStatTID); 3238 3239 /* Cancel absolute delay timer as we have already got attention */ 3239 # ifndef E1K_NO_TAD3240 # ifndef E1K_NO_TAD 3240 3241 e1kCancelTimer(pThis, pThis->CTX_SUFF(pTADTimer)); 3241 # endif /* E1K_NO_TAD */3242 # endif /* E1K_NO_TAD */ 3242 3243 e1kRaiseInterrupt(pThis, ICR_TXDW); 3243 3244 } … … 3263 3264 } 3264 3265 3265 # endif /* E1K_USE_TX_TIMERS */3266 # ifdef E1K_USE_RX_TIMERS3266 # endif /* E1K_USE_TX_TIMERS */ 3267 # ifdef E1K_USE_RX_TIMERS 3267 3268 3268 3269 /** … … 3306 3307 } 3307 3308 3308 # endif /* E1K_USE_RX_TIMERS */3309 # endif /* E1K_USE_RX_TIMERS */ 3309 3310 3310 3311 /** … … 3318 3319 static DECLCALLBACK(void) e1kLateIntTimer(PPDMDEVINS pDevIns, PTMTIMER pTimer, void *pvUser) 3319 3320 { 3321 RT_NOREF(pDevIns, pTimer); 3320 3322 PE1KSTATE pThis = (PE1KSTATE )pvUser; 3321 3323 … … 3323 3325 STAM_COUNTER_INC(&pThis->StatLateInts); 3324 3326 E1K_INC_ISTAT_CNT(pThis->uStatIntLate); 3325 # if 03327 # if 0 3326 3328 if (pThis->iStatIntLost > -100) 3327 3329 pThis->iStatIntLost--; 3328 # endif3330 # endif 3329 3331 e1kRaiseInterrupt(pThis, VERR_SEM_BUSY, 0); 3330 3332 STAM_PROFILE_ADV_STOP(&pThis->StatLateIntTimer, a); … … 3341 3343 static DECLCALLBACK(void) e1kLinkUpTimer(PPDMDEVINS pDevIns, PTMTIMER pTimer, void *pvUser) 3342 3344 { 3345 RT_NOREF(pDevIns, pTimer); 3343 3346 PE1KSTATE pThis = (PE1KSTATE )pvUser; 3344 3347 … … 5310 5313 E1kLog2(("%s e1kTxQueueConsumer:\n", pThis->szPrf)); 5311 5314 5312 int rc = e1kXmitPending(pThis, false /*fOnWorkerThread*/); 5315 int rc = e1kXmitPending(pThis, false /*fOnWorkerThread*/); NOREF(rc); 5313 5316 #ifndef DEBUG_andy /** @todo r=andy Happens for me a lot, mute this for me. */ 5314 5317 AssertMsg(RT_SUCCESS(rc) || rc == VERR_TRY_AGAIN, ("%Rrc\n", rc)); … … 5322 5325 static DECLCALLBACK(bool) e1kCanRxQueueConsumer(PPDMDEVINS pDevIns, PPDMQUEUEITEMCORE pItem) 5323 5326 { 5327 RT_NOREF(pItem); 5324 5328 e1kWakeupReceive(pDevIns); 5325 5329 return true; … … 6016 6020 static void e1kDumpState(PE1KSTATE pThis) 6017 6021 { 6022 RT_NOREF(pThis); 6018 6023 for (int i = 0; i < E1K_NUM_OF_32BIT_REGS; ++i) 6019 { 6020 E1kLog2(("%s %8.8s = %08x\n", pThis->szPrf, 6021 g_aE1kRegMap[i].abbrev, pThis->auRegs[i])); 6022 } 6024 E1kLog2(("%s %8.8s = %08x\n", pThis->szPrf, g_aE1kRegMap[i].abbrev, pThis->auRegs[i])); 6023 6025 # ifdef E1K_INT_STATS 6024 6026 LogRel(("%s Interrupt attempts: %d\n", pThis->szPrf, pThis->uStatIntTry)); … … 6069 6071 static DECLCALLBACK(int) e1kMap(PPCIDEVICE pPciDev, int iRegion, RTGCPHYS GCPhysAddress, uint32_t cb, PCIADDRESSSPACE enmType) 6070 6072 { 6073 RT_NOREF(iRegion); 6071 6074 PE1KSTATE pThis = PDMINS_2_DATA(pPciDev->pDevIns, E1KSTATE*); 6072 6075 int rc; … … 6579 6582 static DECLCALLBACK(int) e1kLiveExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM, uint32_t uPass) 6580 6583 { 6584 RT_NOREF(uPass); 6581 6585 PE1KSTATE pThis = PDMINS_2_DATA(pDevIns, E1KSTATE*); 6582 6586 e1kSaveConfig(pThis, pSSM); … … 6589 6593 static DECLCALLBACK(int) e1kSavePrep(PPDMDEVINS pDevIns, PSSMHANDLE pSSM) 6590 6594 { 6595 RT_NOREF(pSSM); 6591 6596 PE1KSTATE pThis = PDMINS_2_DATA(pDevIns, E1KSTATE*); 6592 6597 … … 6693 6698 static DECLCALLBACK(int) e1kLoadPrep(PPDMDEVINS pDevIns, PSSMHANDLE pSSM) 6694 6699 { 6700 RT_NOREF(pSSM); 6695 6701 PE1KSTATE pThis = PDMINS_2_DATA(pDevIns, E1KSTATE*); 6696 6702 … … 6811 6817 static DECLCALLBACK(int) e1kLoadDone(PPDMDEVINS pDevIns, PSSMHANDLE pSSM) 6812 6818 { 6819 RT_NOREF(pSSM); 6813 6820 PE1KSTATE pThis = PDMINS_2_DATA(pDevIns, E1KSTATE*); 6814 6821 … … 6848 6855 void *pvUser) 6849 6856 { 6857 RT_NOREF(cchWidth, cchPrecision, fFlags, pvUser); 6850 6858 AssertReturn(strcmp(pszType, "e1krxd") == 0, 0); 6851 6859 E1KRXDESC* pDesc = (E1KRXDESC*)pvValue; … … 6886 6894 void *pvUser) 6887 6895 { 6896 RT_NOREF(cchWidth, cchPrecision, fFlags, pvUser); 6888 6897 AssertReturn(strcmp(pszType, "e1ktxd") == 0, 0); 6889 6898 E1KTXDESC *pDesc = (E1KTXDESC*)pvValue; … … 6985 6994 static DECLCALLBACK(void) e1kInfo(PPDMDEVINS pDevIns, PCDBGFINFOHLP pHlp, const char *pszArgs) 6986 6995 { 6996 RT_NOREF(pszArgs); 6987 6997 PE1KSTATE pThis = PDMINS_2_DATA(pDevIns, E1KSTATE*); 6988 6998 unsigned i; … … 7145 7155 static DECLCALLBACK(void) e1kR3Detach(PPDMDEVINS pDevIns, unsigned iLUN, uint32_t fFlags) 7146 7156 { 7157 RT_NOREF(fFlags); 7147 7158 PE1KSTATE pThis = PDMINS_2_DATA(pDevIns, E1KSTATE*); 7148 7159 Log(("%s e1kR3Detach:\n", pThis->szPrf)); … … 7181 7192 static DECLCALLBACK(int) e1kR3Attach(PPDMDEVINS pDevIns, unsigned iLUN, uint32_t fFlags) 7182 7193 { 7194 RT_NOREF(fFlags); 7183 7195 PE1KSTATE pThis = PDMINS_2_DATA(pDevIns, E1KSTATE*); 7184 7196 LogFlow(("%s e1kR3Attach:\n", pThis->szPrf)); … … 7295 7307 static DECLCALLBACK(void) e1kR3Relocate(PPDMDEVINS pDevIns, RTGCINTPTR offDelta) 7296 7308 { 7309 RT_NOREF(offDelta); 7297 7310 PE1KSTATE pThis = PDMINS_2_DATA(pDevIns, E1KSTATE*); 7298 7311 pThis->pDevInsRC = PDMDEVINS_2_RCPTR(pDevIns); -
trunk/src/VBox/Devices/Network/DevVirtioNet.cpp
r62632 r62962 539 539 static DECLCALLBACK(void) vnetLinkUpTimer(PPDMDEVINS pDevIns, PTMTIMER pTimer, void *pvUser) 540 540 { 541 RT_NOREF(pTimer); 541 542 PVNETSTATE pThis = (PVNETSTATE)pvUser; 542 543 … … 559 560 static DECLCALLBACK(bool) vnetCanRxQueueConsumer(PPDMDEVINS pDevIns, PPDMQUEUEITEMCORE pItem) 560 561 { 562 RT_NOREF(pItem); 561 563 vnetWakeupReceive(pDevIns); 562 564 return true; … … 1068 1070 static DECLCALLBACK(void) vnetQueueReceive(void *pvState, PVQUEUE pQueue) 1069 1071 { 1072 RT_NOREF(pQueue); 1070 1073 PVNETSTATE pThis = (PVNETSTATE)pvState; 1071 1074 Log(("%s Receive buffers has been added, waking up receive thread.\n", INSTANCE(pThis))); … … 1320 1323 if (TMTimerIsActive(pThis->CTX_SUFF(pTxTimer))) 1321 1324 { 1322 int rc =TMTimerStop(pThis->CTX_SUFF(pTxTimer));1325 TMTimerStop(pThis->CTX_SUFF(pTxTimer)); 1323 1326 Log3(("%s vnetQueueTransmit: Got kicked with notification disabled, re-enable notification and flush TX queue\n", INSTANCE(pThis))); 1324 1327 vnetTransmitPendingPackets(pThis, pQueue, false /*fOnWorkerThread*/); … … 1350 1353 static DECLCALLBACK(void) vnetTxTimer(PPDMDEVINS pDevIns, PTMTIMER pTimer, void *pvUser) 1351 1354 { 1355 RT_NOREF(pDevIns, pTimer); 1352 1356 PVNETSTATE pThis = (PVNETSTATE)pvUser; 1353 1357 … … 1538 1542 while (vqueueGet(&pThis->VPCI, pQueue, &elem)) 1539 1543 { 1540 unsigned int uOffset = 0;1541 1544 if (elem.nOut < 1 || elem.aSegsOut[0].cb < sizeof(VNETCTLHDR)) 1542 1545 { … … 1602 1605 static DECLCALLBACK(int) vnetLiveExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM, uint32_t uPass) 1603 1606 { 1607 RT_NOREF(uPass); 1604 1608 PVNETSTATE pThis = PDMINS_2_DATA(pDevIns, PVNETSTATE); 1605 1609 vnetSaveConfig(pThis, pSSM); … … 1613 1617 static DECLCALLBACK(int) vnetSavePrep(PPDMDEVINS pDevIns, PSSMHANDLE pSSM) 1614 1618 { 1619 RT_NOREF(pSSM); 1615 1620 PVNETSTATE pThis = PDMINS_2_DATA(pDevIns, PVNETSTATE); 1616 1621 … … 1661 1666 static DECLCALLBACK(int) vnetLoadPrep(PPDMDEVINS pDevIns, PSSMHANDLE pSSM) 1662 1667 { 1668 RT_NOREF(pSSM); 1663 1669 PVNETSTATE pThis = PDMINS_2_DATA(pDevIns, PVNETSTATE); 1664 1670 … … 1739 1745 static DECLCALLBACK(int) vnetLoadDone(PPDMDEVINS pDevIns, PSSMHANDLE pSSM) 1740 1746 { 1747 RT_NOREF(pSSM); 1741 1748 PVNETSTATE pThis = PDMINS_2_DATA(pDevIns, PVNETSTATE); 1742 1749 … … 1760 1767 * @callback_method_impl{FNPCIIOREGIONMAP} 1761 1768 */ 1762 static DECLCALLBACK(int) vnetMap(PPCIDEVICE pPciDev, int iRegion, 1763 RTGCPHYS GCPhysAddress, uint32_t cb, PCIADDRESSSPACE enmType) 1764 { 1769 static DECLCALLBACK(int) vnetMap(PPCIDEVICE pPciDev, int iRegion, RTGCPHYS GCPhysAddress, uint32_t cb, PCIADDRESSSPACE enmType) 1770 { 1771 RT_NOREF(iRegion); 1765 1772 PVNETSTATE pThis = PDMINS_2_DATA(pPciDev->pDevIns, PVNETSTATE); 1766 1773 int rc; … … 1799 1806 static DECLCALLBACK(void) vnetDetach(PPDMDEVINS pDevIns, unsigned iLUN, uint32_t fFlags) 1800 1807 { 1808 RT_NOREF(fFlags); 1801 1809 PVNETSTATE pThis = PDMINS_2_DATA(pDevIns, PVNETSTATE); 1802 1810 Log(("%s vnetDetach:\n", INSTANCE(pThis))); … … 1826 1834 static DECLCALLBACK(int) vnetAttach(PPDMDEVINS pDevIns, unsigned iLUN, uint32_t fFlags) 1827 1835 { 1836 RT_NOREF(fFlags); 1828 1837 PVNETSTATE pThis = PDMINS_2_DATA(pDevIns, PVNETSTATE); 1829 1838 LogFlow(("%s vnetAttach:\n", INSTANCE(pThis))); … … 2066 2075 2067 2076 pThis->u32i = pThis->u32AvgDiff = pThis->u32MaxDiff = 0; 2068 pThis->u32MinDiff = ~0;2077 pThis->u32MinDiff = UINT32_MAX; 2069 2078 #endif /* VNET_TX_DELAY */ 2070 2079 -
trunk/src/VBox/Devices/Network/DrvNetShaper.cpp
r62511 r62962 313 313 static DECLCALLBACK(RTRCPTR) drvR3NetShaperIBaseRC_QueryInterface(PPDMIBASERC pInterface, const char *pszIID) 314 314 { 315 RT_NOREF(pInterface, pszIID); 315 316 return NIL_RTRCPTR; 316 317 } … … 338 339 static DECLCALLBACK(void) drvR3NetShaperDetach(PPDMDRVINS pDrvIns, uint32_t fFlags) 339 340 { 341 RT_NOREF(fFlags); 340 342 PDRVNETSHAPER pThis = PDMINS_2_DATA(pDrvIns, PDRVNETSHAPER); 341 343 -
trunk/src/VBox/Devices/Network/DrvUDPTunnel.cpp
r62511 r62962 113 113 static DECLCALLBACK(int) drvUDPTunnelUp_BeginXmit(PPDMINETWORKUP pInterface, bool fOnWorkerThread) 114 114 { 115 RT_NOREF(fOnWorkerThread); 115 116 PDRVUDPTUNNEL pThis = PDMINETWORKUP_2_DRVUDPTUNNEL(pInterface); 116 117 int rc = RTCritSectTryEnter(&pThis->XmitLock); … … 127 128 */ 128 129 static DECLCALLBACK(int) drvUDPTunnelUp_AllocBuf(PPDMINETWORKUP pInterface, size_t cbMin, 129 130 PCPDMNETWORKGSO pGso, PPPDMSCATTERGATHER ppSgBuf) 130 131 { 131 132 PDRVUDPTUNNEL pThis = PDMINETWORKUP_2_DRVUDPTUNNEL(pInterface); 132 Assert(RTCritSectIsOwner(&pThis->XmitLock)); 133 Assert(RTCritSectIsOwner(&pThis->XmitLock)); NOREF(pThis); 133 134 134 135 /* … … 175 176 { 176 177 PDRVUDPTUNNEL pThis = PDMINETWORKUP_2_DRVUDPTUNNEL(pInterface); 177 Assert(RTCritSectIsOwner(&pThis->XmitLock)); 178 Assert(RTCritSectIsOwner(&pThis->XmitLock)); NOREF(pThis); 178 179 if (pSgBuf) 179 180 { … … 191 192 static DECLCALLBACK(int) drvUDPTunnelUp_SendBuf(PPDMINETWORKUP pInterface, PPDMSCATTERGATHER pSgBuf, bool fOnWorkerThread) 192 193 { 194 RT_NOREF(fOnWorkerThread); 193 195 PDRVUDPTUNNEL pThis = PDMINETWORKUP_2_DRVUDPTUNNEL(pInterface); 194 196 STAM_COUNTER_INC(&pThis->StatPktSent); … … 224 226 uint32_t const cSegs = PDMNetGsoCalcSegmentCount(pGso, pSgBuf->cbUsed); Assert(cSegs > 1); 225 227 rc = VINF_SUCCESS; 226 for ( size_t iSeg = 0; iSeg < cSegs; iSeg++)228 for (uint32_t iSeg = 0; iSeg < cSegs; iSeg++) 227 229 { 228 230 uint32_t cbSegFrame; … … 264 266 static DECLCALLBACK(void) drvUDPTunnelUp_SetPromiscuousMode(PPDMINETWORKUP pInterface, bool fPromiscuous) 265 267 { 268 RT_NOREF(pInterface, fPromiscuous); 266 269 LogFlowFunc(("fPromiscuous=%d\n", fPromiscuous)); 267 270 /* nothing to do */ … … 450 453 static DECLCALLBACK(int) drvUDPTunnelConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags) 451 454 { 455 RT_NOREF(fFlags); 456 PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns); 452 457 PDRVUDPTUNNEL pThis = PDMINS_2_DATA(pDrvIns, PDRVUDPTUNNEL); 453 PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns);454 458 455 459 /* -
trunk/src/VBox/Devices/VirtIO/Virtio.cpp
r62618 r62962 917 917 void vpciRelocate(PPDMDEVINS pDevIns, RTGCINTPTR offDelta) 918 918 { 919 VPCISTATE* pState = PDMINS_2_DATA(pDevIns, VPCISTATE*); 920 pState->pDevInsRC = PDMDEVINS_2_RCPTR(pDevIns); 919 RT_NOREF(offDelta); 920 VPCISTATE *pState = PDMINS_2_DATA(pDevIns, VPCISTATE*); 921 pState->pDevInsRC = PDMDEVINS_2_RCPTR(pDevIns); 921 922 // TBD 922 923 }
Note:
See TracChangeset
for help on using the changeset viewer.