Changeset 82129 in vbox
- Timestamp:
- Nov 23, 2019 5:28:03 PM (5 years ago)
- svn:sync-xref-src-repo-rev:
- 134939
- Location:
- trunk/src/VBox/Devices/Network
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/DevE1000.cpp
r81727 r82129 7731 7731 "EthernetCRC|" 7732 7732 "GSOEnabled|" 7733 "LinkUpDelay", ""); 7733 "LinkUpDelay|" 7734 "StatNo", 7735 ""); 7734 7736 7735 7737 /** @todo LineSpeed unused! */ … … 7788 7790 LogRel(("%s: WARNING! Link up delay is disabled!\n", pThis->szPrf)); 7789 7791 7792 uint32_t uStatNo = iInstance; 7793 rc = pHlp->pfnCFGMQueryU32Def(pCfg, "StatNo", &uStatNo, iInstance); 7794 if (RT_FAILURE(rc)) 7795 return PDMDEV_SET_ERROR(pDevIns, rc, N_("Configuration error: Failed to get the \"StatNo\" value")); 7796 7790 7797 LogRel(("%s: Chip=%s LinkUpDelay=%ums EthernetCRC=%s GSO=%s Itr=%s ItrRx=%s TID=%s R0=%s RC=%s\n", pThis->szPrf, 7791 7798 g_aChips[pThis->eChip].pcszName, pThis->cMsLinkUpDelay, … … 7968 7975 /* 7969 7976 * Register statistics. 7977 * The /Public/ bits are official and used by session info in the GUI. 7970 7978 */ 7971 PDMDevHlpSTAMRegisterF(pDevIns, &pThis->StatReceiveBytes, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_BYTES, "Amount of data received", "/Public/Net/E1k%u/BytesReceived", iInstance); 7972 PDMDevHlpSTAMRegisterF(pDevIns, &pThis->StatTransmitBytes, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_BYTES, "Amount of data transmitted", "/Public/Net/E1k%u/BytesTransmitted", iInstance); 7973 7974 PDMDevHlpSTAMRegisterF(pDevIns, &pThis->StatReceiveBytes, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_BYTES, "Amount of data received", "ReceiveBytes"); 7975 PDMDevHlpSTAMRegisterF(pDevIns, &pThis->StatTransmitBytes, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_BYTES, "Amount of data transmitted", "TransmitBytes"); 7979 PDMDevHlpSTAMRegisterF(pDevIns, &pThis->StatReceiveBytes, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_BYTES, 7980 "Amount of data received", "/Public/NetAdapter/%u/BytesReceived", uStatNo); 7981 PDMDevHlpSTAMRegisterF(pDevIns, &pThis->StatTransmitBytes, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_BYTES, 7982 "Amount of data transmitted", "/Public/NetAdapter/%u/BytesTransmitted", uStatNo); 7983 PDMDevHlpSTAMRegisterF(pDevIns, &pDevIns->iInstance, STAMTYPE_U32, STAMVISIBILITY_ALWAYS, STAMUNIT_NONE, 7984 "Device instance number", "/Public/NetAdapter/%u/%s", uStatNo, pDevIns->pReg->szName); 7985 7986 PDMDevHlpSTAMRegister(pDevIns, &pThis->StatReceiveBytes, STAMTYPE_COUNTER, "ReceiveBytes", STAMUNIT_BYTES, "Amount of data received"); 7987 PDMDevHlpSTAMRegister(pDevIns, &pThis->StatTransmitBytes, STAMTYPE_COUNTER, "TransmitBytes", STAMUNIT_BYTES, "Amount of data transmitted"); 7976 7988 7977 7989 #if defined(VBOX_WITH_STATISTICS) -
trunk/src/VBox/Devices/Network/DevPCNet.cpp
r82128 r82129 5124 5124 */ 5125 5125 PDMDEV_VALIDATE_CONFIG_RETURN(pDevIns, 5126 "MAC|CableConnected|Am79C973|ChipType|Port|IRQ|LineSpeed|PrivIfEnabled|LinkUpDelay ",5126 "MAC|CableConnected|Am79C973|ChipType|Port|IRQ|LineSpeed|PrivIfEnabled|LinkUpDelay|StatNo", 5127 5127 ""); 5128 5128 /* … … 5198 5198 Log(("#%d Link up delay is set to %u seconds\n", iInstance, pThis->cMsLinkUpDelay / 1000)); 5199 5199 5200 uint32_t uStatNo = iInstance; 5201 rc = pHlp->pfnCFGMQueryU32Def(pCfg, "StatNo", &uStatNo, iInstance); 5202 if (RT_FAILURE(rc)) 5203 return PDMDEV_SET_ERROR(pDevIns, rc, N_("Configuration error: Failed to get the \"StatNo\" value")); 5200 5204 5201 5205 /* … … 5426 5430 /* 5427 5431 * Register statistics. 5432 * The /Public/ bits are official and used by session info in the GUI. 5428 5433 */ 5429 5434 PDMDevHlpSTAMRegisterF(pDevIns, &pThis->StatReceiveBytes, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_BYTES, 5430 "Amount of data received", "/Public/Net /PCnet%u/BytesReceived", iInstance);5435 "Amount of data received", "/Public/NetAdapter/%u/BytesReceived", uStatNo); 5431 5436 PDMDevHlpSTAMRegisterF(pDevIns, &pThis->StatTransmitBytes, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_BYTES, 5432 "Amount of data transmitted", "/Public/Net/PCnet%u/BytesTransmitted", iInstance); 5437 "Amount of data transmitted", "/Public/NetAdapter/%u/BytesTransmitted", uStatNo); 5438 PDMDevHlpSTAMRegisterF(pDevIns, &pDevIns->iInstance, STAMTYPE_U32, STAMVISIBILITY_ALWAYS, STAMUNIT_NONE, 5439 "Device instance number", "/Public/NetAdapter/%u/%s", uStatNo, pDevIns->pReg->szName); 5433 5440 5434 5441 PDMDevHlpSTAMRegister(pDevIns, &pThis->StatReceiveBytes, STAMTYPE_COUNTER, "ReceiveBytes", STAMUNIT_BYTES, "Amount of data received"); -
trunk/src/VBox/Devices/Network/DevVirtioNet.cpp
r81731 r82129 2189 2189 * Validate configuration. 2190 2190 */ 2191 PDMDEV_VALIDATE_CONFIG_RETURN(pDevIns, "MAC|CableConnected|LineSpeed|LinkUpDelay ", "");2191 PDMDEV_VALIDATE_CONFIG_RETURN(pDevIns, "MAC|CableConnected|LineSpeed|LinkUpDelay|StatNo", ""); 2192 2192 2193 2193 /* Get config params */ … … 2195 2195 if (RT_FAILURE(rc)) 2196 2196 return PDMDEV_SET_ERROR(pDevIns, rc, N_("Configuration error: Failed to get MAC address")); 2197 2197 2198 rc = pHlp->pfnCFGMQueryBool(pCfg, "CableConnected", &pThis->fCableConnected); 2198 2199 if (RT_FAILURE(rc)) 2199 2200 return PDMDEV_SET_ERROR(pDevIns, rc, N_("Configuration error: Failed to get the value of 'CableConnected'")); 2201 2200 2202 rc = pHlp->pfnCFGMQueryU32Def(pCfg, "LinkUpDelay", &pThis->cMsLinkUpDelay, 5000); /* ms */ 2201 2203 if (RT_FAILURE(rc)) … … 2206 2208 Log(("%s Link up delay is set to %u seconds\n", INSTANCE(pThis), pThis->cMsLinkUpDelay / 1000)); 2207 2209 2210 uint32_t uStatNo = iInstance; 2211 rc = pHlp->pfnCFGMQueryU32Def(pCfg, "StatNo", &uStatNo, iInstance); 2212 if (RT_FAILURE(rc)) 2213 return PDMDEV_SET_ERROR(pDevIns, rc, N_("Configuration error: Failed to get the \"StatNo\" value")); 2214 2208 2215 vnetPrintFeatures(pThis, vnetIoCb_GetHostFeatures(&pThis->VPCI), "Device supports the following features"); 2209 2216 … … 2274 2281 /* 2275 2282 * Statistics and debug stuff. 2283 * The /Public/ bits are official and used by session info in the GUI. 2276 2284 */ 2277 PDMDevHlpSTAMRegisterF(pDevIns, &pThis->StatReceiveBytes, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_BYTES, "Amount of data received", "/Public/Net/VNet%u/BytesReceived", iInstance); 2278 PDMDevHlpSTAMRegisterF(pDevIns, &pThis->StatTransmitBytes, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_BYTES, "Amount of data transmitted", "/Public/Net/VNet%u/BytesTransmitted", iInstance); 2285 PDMDevHlpSTAMRegisterF(pDevIns, &pThis->StatReceiveBytes, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_BYTES, 2286 "Amount of data received", "/Public/NetAdapter/%u/BytesReceived", uStatNo); 2287 PDMDevHlpSTAMRegisterF(pDevIns, &pThis->StatTransmitBytes, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_BYTES, 2288 "Amount of data transmitted", "/Public/NetAdapter/%u/BytesTransmitted", uStatNo); 2289 PDMDevHlpSTAMRegisterF(pDevIns, &pDevIns->iInstance, STAMTYPE_U32, STAMVISIBILITY_ALWAYS, STAMUNIT_NONE, 2290 "Device instance number", "/Public/NetAdapter/%u/%s", uStatNo, pDevIns->pReg->szName); 2279 2291 2280 2292 PDMDevHlpSTAMRegister(pDevIns, &pThis->StatReceiveBytes, STAMTYPE_COUNTER, "ReceiveBytes", STAMUNIT_BYTES, "Amount of data received");
Note:
See TracChangeset
for help on using the changeset viewer.