VirtualBox

Changeset 21363 in vbox for trunk/src/VBox/Devices/Network


Ignore:
Timestamp:
Jul 7, 2009 5:10:52 PM (16 years ago)
Author:
vboxsync
Message:

PDMQueue&users-thereof: Named the queues and added statistics.

Location:
trunk/src/VBox/Devices/Network
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Network/DevE1000.cpp

    r21188 r21363  
    48094809    /* Create transmit queue */
    48104810    rc = PDMDevHlpPDMQueueCreate(pDevIns, sizeof(PDMQUEUEITEMCORE), 1, 0,
    4811                                  e1kTxQueueConsumer, true, &pState->pTxQueueR3);
     4811                                 e1kTxQueueConsumer, true, "E1000-Xmit", &pState->pTxQueueR3);
    48124812    if (RT_FAILURE(rc))
    48134813        return rc;
     
    48174817    /* Create the RX notifier signaller. */
    48184818    rc = PDMDevHlpPDMQueueCreate(pDevIns, sizeof(PDMQUEUEITEMCORE), 1, 0,
    4819                                  e1kCanRxQueueConsumer, true, &pState->pCanRxQueueR3);
     4819                                 e1kCanRxQueueConsumer, true, "E1000-Rcv", &pState->pCanRxQueueR3);
    48204820    if (RT_FAILURE(rc))
    48214821        return rc;
  • trunk/src/VBox/Devices/Network/DevPCNet.cpp

    r21188 r21363  
    50845084     */
    50855085    rc = PDMDevHlpPDMQueueCreate(pDevIns, sizeof(PDMQUEUEITEMCORE), 1, 0,
    5086                                  pcnetXmitQueueConsumer, true, &pThis->pXmitQueueR3);
     5086                                 pcnetXmitQueueConsumer, true, "PCNet-Xmit", &pThis->pXmitQueueR3);
    50875087    if (RT_FAILURE(rc))
    50885088        return rc;
     
    50945094     */
    50955095    rc = PDMDevHlpPDMQueueCreate(pDevIns, sizeof(PDMQUEUEITEMCORE), 1, 0,
    5096                                  pcnetCanRxQueueConsumer, true, &pThis->pCanRxQueueR3);
     5096                                 pcnetCanRxQueueConsumer, true, "PCNet-Rcv", &pThis->pCanRxQueueR3);
    50975097    if (RT_FAILURE(rc))
    50985098        return rc;
  • trunk/src/VBox/Devices/Network/DrvNAT.cpp

    r21112 r21363  
    716716                fUDP = true;
    717717            else
    718                 return PDMDrvHlpVMSetError(pThis->pDrvIns, VERR_INVALID_PARAMETER, RT_SRC_POS, 
    719                     N_("NAT#%d: Invalid configuration value for \"Protocol\": \"%s\""), 
     718                return PDMDrvHlpVMSetError(pThis->pDrvIns, VERR_INVALID_PARAMETER, RT_SRC_POS,
     719                    N_("NAT#%d: Invalid configuration value for \"Protocol\": \"%s\""),
    720720                    iInstance, szProtocol);
    721721        }
     
    742742                                       N_("NAT#%d: configuration error: failed to set up "
    743743                                       "redirection of %d to %d. Probably a conflict with "
    744                                        "existing services or other rules"), iInstance, iHostPort, 
     744                                       "existing services or other rules"), iInstance, iHostPort,
    745745                                       iGuestPort);
    746746    } /* for each redir rule */
     
    822822    bool fPassDomain = true;
    823823    GET_BOOL(rc, pThis, pCfgHandle, "PassDomain", fPassDomain);
    824    
     824
    825825    GET_STRING_ALLOC(rc, pThis, pCfgHandle, "TFTPPrefix", pThis->pszTFTPPrefix);
    826826    GET_STRING_ALLOC(rc, pThis, pCfgHandle, "BootFile", pThis->pszBootFile);
     
    833833     * Query the network port interface.
    834834     */
    835     pThis->pPort = 
    836                 (PPDMINETWORKPORT)pDrvIns->pUpBase->pfnQueryInterface(pDrvIns->pUpBase, 
     835    pThis->pPort =
     836                (PPDMINETWORKPORT)pDrvIns->pUpBase->pfnQueryInterface(pDrvIns->pUpBase,
    837837                                                                      PDMINTERFACE_NETWORK_PORT);
    838838    if (!pThis->pPort)
     
    840840                                N_("Configuration error: the above device/driver didn't "
    841841                                "export the network port interface"));
    842     pThis->pConfig = 
    843                 (PPDMINETWORKCONFIG)pDrvIns->pUpBase->pfnQueryInterface(pDrvIns->pUpBase, 
     842    pThis->pConfig =
     843                (PPDMINETWORKCONFIG)pDrvIns->pUpBase->pfnQueryInterface(pDrvIns->pUpBase,
    844844                                                                        PDMINTERFACE_NETWORK_CONFIG);
    845845    if (!pThis->pConfig)
     
    858858    if (RT_FAILURE(rc))
    859859        return PDMDrvHlpVMSetError(pDrvIns, rc, RT_SRC_POS, N_("NAT#%d: Configuration error: "
    860                                    "network '%s' describes not a valid IPv4 network"), 
     860                                   "network '%s' describes not a valid IPv4 network"),
    861861                                   pDrvIns->iInstance, szNetwork);
    862862
    863863    RTStrPrintf(szNetAddr, sizeof(szNetAddr), "%d.%d.%d.%d",
    864                (Network & 0xFF000000) >> 24, (Network & 0xFF0000) >> 16, 
     864               (Network & 0xFF000000) >> 24, (Network & 0xFF0000) >> 16,
    865865               (Network & 0xFF00) >> 8, Network & 0xFF);
    866866
     
    899899        slirp_register_statistics(pThis->pNATState, pDrvIns);
    900900#ifdef VBOX_WITH_STATISTICS
    901         PDMDrvHlpSTAMRegisterF(pDrvIns, &pThis->StatQueuePktSent,    STAMTYPE_COUNTER, 
     901        PDMDrvHlpSTAMRegisterF(pDrvIns, &pThis->StatQueuePktSent,    STAMTYPE_COUNTER,
    902902                              STAMVISIBILITY_ALWAYS, STAMUNIT_COUNT, "counting packet sent viai "
    903903                              "PDM queue", "/Drivers/NAT%u/QueuePacketSent", pDrvIns->iInstance);
    904         PDMDrvHlpSTAMRegisterF(pDrvIns, &pThis->StatQueuePktDropped, STAMTYPE_COUNTER, 
    905                               STAMVISIBILITY_ALWAYS, STAMUNIT_COUNT, "counting packet sent via PDM" 
     904        PDMDrvHlpSTAMRegisterF(pDrvIns, &pThis->StatQueuePktDropped, STAMTYPE_COUNTER,
     905                              STAMVISIBILITY_ALWAYS, STAMUNIT_COUNT, "counting packet sent via PDM"
    906906                              " queue", "/Drivers/NAT%u/QueuePacketDropped", pDrvIns->iInstance);
    907907#endif
     
    925925            }
    926926
    927             rc = PDMDrvHlpPDMQueueCreate(pDrvIns, sizeof(DRVNATQUEUITEM), 50, 0, 
    928                                          drvNATQueueConsumer, &pThis->pSendQueue);
     927            rc = PDMDrvHlpPDMQueueCreate(pDrvIns, sizeof(DRVNATQUEUITEM), 50, 0,
     928                                         drvNATQueueConsumer, "NAT", &pThis->pSendQueue);
    929929            if (RT_FAILURE(rc))
    930930            {
     
    948948#else
    949949            pThis->hWakeupEvent = CreateEvent(NULL, FALSE, FALSE, NULL); /* auto-reset event */
    950             slirp_register_external_event(pThis->pNATState, pThis->hWakeupEvent, 
     950            slirp_register_external_event(pThis->pNATState, pThis->hWakeupEvent,
    951951                                          VBOX_WAKEUP_EVENT_INDEX);
    952952#endif
    953953
    954             rc = PDMDrvHlpPDMThreadCreate(pDrvIns, &pThis->pThread, pThis, drvNATAsyncIoThread, 
     954            rc = PDMDrvHlpPDMThreadCreate(pDrvIns, &pThis->pThread, pThis, drvNATAsyncIoThread,
    955955                                          drvNATAsyncIoWakeup, 128 * _1K, RTTHREADTYPE_IO, "NAT");
    956956            AssertReleaseRC(rc);
    957957
    958958#ifdef VBOX_WITH_SLIRP_MT
    959             rc = PDMDrvHlpPDMThreadCreate(pDrvIns, &pThis->pGuestThread, pThis, drvNATAsyncIoGuest, 
     959            rc = PDMDrvHlpPDMThreadCreate(pDrvIns, &pThis->pGuestThread, pThis, drvNATAsyncIoGuest,
    960960                                          drvNATAsyncIoGuestWakeup, 128 * _1K, RTTHREADTYPE_IO, "NATGUEST");
    961961            AssertReleaseRC(rc);
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette