Changeset 64684 in vbox for trunk/src/VBox/Devices/Network
- Timestamp:
- Nov 16, 2016 3:14:26 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/DevE1000.cpp
r64518 r64684 71 71 */ 72 72 #define E1K_INIT_LINKUP_DELAY (500 * 1000) 73 /** @def E1K_IMS_INT_DELAY_NS 74 * E1K_IMS_INT_DELAY_NS prevents interrupt storms in Windows guests on enabling 75 * interrupts (see @bugref{8624}). 76 */ 77 #define E1K_IMS_INT_DELAY_NS 100 73 78 /** @def E1K_TX_DELAY 74 79 * E1K_TX_DELAY aims to improve guest-host transfer rate for TCP streams by … … 102 107 * debugging of delayed interrupts, etc. 103 108 */ 104 //#define E1K_INT_STATS109 #define E1K_INT_STATS 105 110 /** @def E1K_WITH_MSI 106 111 * E1K_WITH_MSI enables rudimentary MSI support. Not implemented. … … 1255 1260 uint32_t uStatIntTry; 1256 1261 uint32_t uStatIntLower; 1257 uint32_t uStat IntDly;1262 uint32_t uStatNoIntICR; 1258 1263 int32_t iStatIntLost; 1259 1264 int32_t iStatIntLostOne; 1260 uint32_t uStat DisDly;1265 uint32_t uStatIntIMS; 1261 1266 uint32_t uStatIntSkip; 1262 1267 uint32_t uStatIntLate; … … 2919 2924 if (value) 2920 2925 { 2926 if (!pThis->fIntRaised) 2927 E1K_INC_ISTAT_CNT(pThis->uStatNoIntICR); 2921 2928 /* 2922 2929 * Not clearing ICR causes QNX to hang as it reads ICR in a loop … … 2996 3003 E1kLogRel(("E1000: irq enabled, RDH=%x RDT=%x TDH=%x TDT=%x\n", RDH, RDT, TDH, TDT)); 2997 3004 E1kLog(("%s e1kRegWriteIMS: IRQ enabled\n", pThis->szPrf)); 2998 e1kRaiseInterrupt(pThis, VINF_IOM_R3_MMIO_WRITE, 0); 3005 /* 3006 * We cannot raise an interrupt here as it will occasionally cause an interrupt storm 3007 * in Windows guests (see @bugref{8624}, @bugref{5023}). 3008 */ 3009 if ((ICR & IMS) && !pThis->fLocked) 3010 { 3011 E1K_INC_ISTAT_CNT(pThis->uStatIntIMS); 3012 e1kPostponeInterrupt(pThis, E1K_IMS_INT_DELAY_NS); 3013 } 2999 3014 3000 3015 return VINF_SUCCESS; … … 6069 6084 LogRel(("%s Interrupts raised : %d\n", pThis->szPrf, pThis->uStatInt)); 6070 6085 LogRel(("%s Interrupts lowered: %d\n", pThis->szPrf, pThis->uStatIntLower)); 6071 LogRel(("%s I nterrupts delayed: %d\n", pThis->szPrf, pThis->uStatIntDly));6072 LogRel(("%s Disabled delayed: %d\n", pThis->szPrf, pThis->uStatDisDly));6086 LogRel(("%s ICR outside ISR : %d\n", pThis->szPrf, pThis->uStatNoIntICR)); 6087 LogRel(("%s IMS raised ints : %d\n", pThis->szPrf, pThis->uStatIntIMS)); 6073 6088 LogRel(("%s Interrupts skipped: %d\n", pThis->szPrf, pThis->uStatIntSkip)); 6074 6089 LogRel(("%s Masked interrupts : %d\n", pThis->szPrf, pThis->uStatIntMasked)); … … 7157 7172 pHlp->pfnPrintf(pHlp, "Interrupts raised : %d\n", pThis->uStatInt); 7158 7173 pHlp->pfnPrintf(pHlp, "Interrupts lowered: %d\n", pThis->uStatIntLower); 7159 pHlp->pfnPrintf(pHlp, "I nterrupts delayed: %d\n", pThis->uStatIntDly);7160 pHlp->pfnPrintf(pHlp, " Disabled delayed: %d\n", pThis->uStatDisDly);7174 pHlp->pfnPrintf(pHlp, "ICR outside ISR : %d\n", pThis->uStatNoIntICR); 7175 pHlp->pfnPrintf(pHlp, "IMS raised ints : %d\n", pThis->uStatIntIMS); 7161 7176 pHlp->pfnPrintf(pHlp, "Interrupts skipped: %d\n", pThis->uStatIntSkip); 7162 7177 pHlp->pfnPrintf(pHlp, "Masked interrupts : %d\n", pThis->uStatIntMasked); … … 7889 7904 PDMDevHlpSTAMRegisterF(pDevIns, &pThis->uStatIntTry, STAMTYPE_U32, STAMVISIBILITY_ALWAYS, STAMUNIT_NS, "uStatIntTry", "/Devices/E1k%d/uStatIntTry", iInstance); 7890 7905 PDMDevHlpSTAMRegisterF(pDevIns, &pThis->uStatIntLower, STAMTYPE_U32, STAMVISIBILITY_ALWAYS, STAMUNIT_NS, "uStatIntLower", "/Devices/E1k%d/uStatIntLower", iInstance); 7891 PDMDevHlpSTAMRegisterF(pDevIns, &pThis->uStat IntDly, STAMTYPE_U32, STAMVISIBILITY_ALWAYS, STAMUNIT_NS, "uStatIntDly", "/Devices/E1k%d/uStatIntDly", iInstance);7906 PDMDevHlpSTAMRegisterF(pDevIns, &pThis->uStatNoIntICR, STAMTYPE_U32, STAMVISIBILITY_ALWAYS, STAMUNIT_NS, "uStatNoIntICR", "/Devices/E1k%d/uStatNoIntICR", iInstance); 7892 7907 PDMDevHlpSTAMRegisterF(pDevIns, &pThis->iStatIntLost, STAMTYPE_U32, STAMVISIBILITY_ALWAYS, STAMUNIT_NS, "iStatIntLost", "/Devices/E1k%d/iStatIntLost", iInstance); 7893 7908 PDMDevHlpSTAMRegisterF(pDevIns, &pThis->iStatIntLostOne, STAMTYPE_U32, STAMVISIBILITY_ALWAYS, STAMUNIT_NS, "iStatIntLostOne", "/Devices/E1k%d/iStatIntLostOne", iInstance); 7894 PDMDevHlpSTAMRegisterF(pDevIns, &pThis->uStat DisDly, STAMTYPE_U32, STAMVISIBILITY_ALWAYS, STAMUNIT_NS, "uStatDisDly", "/Devices/E1k%d/uStatDisDly", iInstance);7909 PDMDevHlpSTAMRegisterF(pDevIns, &pThis->uStatIntIMS, STAMTYPE_U32, STAMVISIBILITY_ALWAYS, STAMUNIT_NS, "uStatIntIMS", "/Devices/E1k%d/uStatIntIMS", iInstance); 7895 7910 PDMDevHlpSTAMRegisterF(pDevIns, &pThis->uStatIntSkip, STAMTYPE_U32, STAMVISIBILITY_ALWAYS, STAMUNIT_NS, "uStatIntSkip", "/Devices/E1k%d/uStatIntSkip", iInstance); 7896 7911 PDMDevHlpSTAMRegisterF(pDevIns, &pThis->uStatIntLate, STAMTYPE_U32, STAMVISIBILITY_ALWAYS, STAMUNIT_NS, "uStatIntLate", "/Devices/E1k%d/uStatIntLate", iInstance);
Note:
See TracChangeset
for help on using the changeset viewer.