VirtualBox

Changeset 56991 in vbox


Ignore:
Timestamp:
Jul 18, 2015 10:48:35 PM (10 years ago)
Author:
vboxsync
Message:

DevVirtioNet.cpp: Don't ever split log format strings!! Makes them very hard to search/grep for.

File:
1 edited

Legend:

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

    r56292 r56991  
    677677            break;
    678678        }
    679         Log(("%s vnetNetworkDown_WaitReceiveAvail: waiting cMillies=%u...\n",
    680                 INSTANCE(pThis), cMillies));
     679        Log(("%s vnetNetworkDown_WaitReceiveAvail: waiting cMillies=%u...\n", INSTANCE(pThis), cMillies));
    681680        RTSemEventWait(pThis->hEventMoreRxDescAvail, cMillies);
    682681    }
     
    757756    if (!memcmp(pThis->config.mac.au8, pvBuf, sizeof(RTMAC)))
    758757        return true;
    759     Log4(("%s vnetAddressFilter: %RTmac (conf) != %RTmac (dest)\n",
    760           INSTANCE(pThis), pThis->config.mac.au8, pvBuf));
     758    Log4(("%s vnetAddressFilter: %RTmac (conf) != %RTmac (dest)\n", INSTANCE(pThis), pThis->config.mac.au8, pvBuf));
    761759
    762760    for (unsigned i = 0; i < pThis->nMacFilterEntries; i++)
     
    791789    if (pGso)
    792790    {
    793         Log2(("%s vnetHandleRxPacket: gso type=%x cbHdrsTotal=%u cbHdrsSeg=%u mss=%u"
    794               " off1=0x%x off2=0x%x\n", INSTANCE(pThis), pGso->u8Type,
    795               pGso->cbHdrsTotal, pGso->cbHdrsSeg, pGso->cbMaxSeg, pGso->offHdr1, pGso->offHdr2));
     791        Log2(("%s vnetHandleRxPacket: gso type=%x cbHdrsTotal=%u cbHdrsSeg=%u mss=%u off1=0x%x off2=0x%x\n",
     792              INSTANCE(pThis), pGso->u8Type, pGso->cbHdrsTotal, pGso->cbHdrsSeg, pGso->cbMaxSeg, pGso->offHdr1, pGso->offHdr2));
    796793        Hdr.Hdr.u8Flags = VNETHDR_F_NEEDS_CSUM;
    797794        switch (pGso->u8Type)
     
    894891        if (RT_FAILURE(rc))
    895892        {
    896             Log(("%s vnetHandleRxPacket: Failed to write merged RX buf header: %Rrc\n",
    897                  INSTANCE(pThis), rc));
     893            Log(("%s vnetHandleRxPacket: Failed to write merged RX buf header: %Rrc\n", INSTANCE(pThis), rc));
    898894            return rc;
    899895        }
     
    902898    if (uOffset < cb)
    903899    {
    904         Log(("%s vnetHandleRxPacket: Packet did not fit into RX queue (packet size=%u)!\n",
    905              INSTANCE(pThis), cb));
     900        Log(("%s vnetHandleRxPacket: Packet did not fit into RX queue (packet size=%u)!\n", INSTANCE(pThis), cb));
    906901        return VERR_TOO_MUCH_DATA;
    907902    }
     
    941936        if (!uFeatures)
    942937        {
    943             Log2(("%s vnetNetworkDown_ReceiveGso: GSO type (0x%x) not supported\n",
    944                   INSTANCE(pThis), pGso->u8Type));
     938            Log2(("%s vnetNetworkDown_ReceiveGso: GSO type (0x%x) not supported\n", INSTANCE(pThis), pGso->u8Type));
    945939            return VERR_NOT_SUPPORTED;
    946940        }
    947941    }
    948942
    949     Log2(("%s vnetNetworkDown_ReceiveGso: pvBuf=%p cb=%u pGso=%p\n",
    950           INSTANCE(pThis), pvBuf, cb, pGso));
     943    Log2(("%s vnetNetworkDown_ReceiveGso: pvBuf=%p cb=%u pGso=%p\n", INSTANCE(pThis), pvBuf, cb, pGso));
    951944    int rc = vnetCanReceive(pThis);
    952945    if (RT_FAILURE(rc))
     
    11511144    if ((pThis->VPCI.uStatus & VPCI_STATUS_DRV_OK) == 0)
    11521145    {
    1153         Log(("%s Ignoring transmit requests from non-existent driver (status=0x%x).\n",
    1154              INSTANCE(pThis), pThis->VPCI.uStatus));
     1146        Log(("%s Ignoring transmit requests from non-existent driver (status=0x%x).\n", INSTANCE(pThis), pThis->VPCI.uStatus));
    11551147        return;
    11561148    }
     
    11741166        uHdrLen = sizeof(VNETHDR);
    11751167
    1176     Log3(("%s vnetTransmitPendingPackets: About to transmit %d pending packets\n", INSTANCE(pThis),
    1177           vringReadAvailIndex(&pThis->VPCI, &pThis->pTxQueue->VRing) - pThis->pTxQueue->uNextAvailIndex));
     1168    Log3(("%s vnetTransmitPendingPackets: About to transmit %d pending packets\n",
     1169          INSTANCE(pThis), vringReadAvailIndex(&pThis->VPCI, &pThis->pTxQueue->VRing) - pThis->pTxQueue->uNextAvailIndex));
    11781170
    11791171    vpciSetWriteLed(&pThis->VPCI, true);
     
    12001192            for (unsigned int i = 1; i < elem.nOut; i++)
    12011193                uSize += elem.aSegsOut[i].cb;
    1202             Log5(("%s vnetTransmitPendingPackets: complete frame is %u bytes.\n",
    1203                   INSTANCE(pThis), uSize));
     1194            Log5(("%s vnetTransmitPendingPackets: complete frame is %u bytes.\n", INSTANCE(pThis), uSize));
    12041195            Assert(uSize <= VNET_MAX_FRAME_SIZE);
    12051196            if (pThis->pDrv)
     
    12621253                                  INSTANCE(pThis), pGso->cbHdrsTotal));
    12631254                        }
    1264                         Log2(("%s vnetTransmitPendingPackets: gso type=%x cbHdrsTotal=%u cbHdrsSeg=%u mss=%u"
    1265                               " off1=0x%x off2=0x%x\n", INSTANCE(pThis), pGso->u8Type,
    1266                               pGso->cbHdrsTotal, pGso->cbHdrsSeg, pGso->cbMaxSeg, pGso->offHdr1, pGso->offHdr2));
     1255                        Log2(("%s vnetTransmitPendingPackets: gso type=%x cbHdrsTotal=%u cbHdrsSeg=%u mss=%u off1=0x%x off2=0x%x\n",
     1256                              INSTANCE(pThis), pGso->u8Type, pGso->cbHdrsTotal, pGso->cbHdrsSeg, pGso->cbMaxSeg, pGso->offHdr1, pGso->offHdr2));
    12671257                        STAM_REL_COUNTER_INC(&pThis->StatTransmitGSO);
    12681258                    }
     
    13231313    {
    13241314        int rc = TMTimerStop(pThis->CTX_SUFF(pTxTimer));
    1325         Log3(("%s vnetQueueTransmit: Got kicked with notification disabled, "
    1326               "re-enable notification and flush TX queue\n", INSTANCE(pThis)));
     1315        Log3(("%s vnetQueueTransmit: Got kicked with notification disabled, re-enable notification and flush TX queue\n", INSTANCE(pThis)));
    13271316        vnetTransmitPendingPackets(pThis, pQueue, false /*fOnWorkerThread*/);
    13281317        if (RT_FAILURE(vnetCsEnter(pThis, VERR_SEM_BUSY)))
     
    13631352    pThis->u32i++;
    13641353    Log3(("vnetTxTimer: Expired, diff %9d usec, avg %9d usec, min %9d usec, max %9d usec\n",
    1365             u32MicroDiff, pThis->u32AvgDiff, pThis->u32MinDiff, pThis->u32MaxDiff));
     1354          u32MicroDiff, pThis->u32AvgDiff, pThis->u32MinDiff, pThis->u32MaxDiff));
    13661355
    13671356//    Log3(("%s vnetTxTimer: Expired\n", INSTANCE(pThis)));
     
    14221411        || pElem->aSegsOut[2].cb < sizeof(nMacs))
    14231412    {
    1424         Log(("%s vnetControlMac: Segment layout is wrong "
    1425              "(u8Command=%u nOut=%u cb1=%u cb2=%u)\n", INSTANCE(pThis),
    1426              pCtlHdr->u8Command, pElem->nOut,
    1427              pElem->aSegsOut[1].cb, pElem->aSegsOut[2].cb));
     1413        Log(("%s vnetControlMac: Segment layout is wrong (u8Command=%u nOut=%u cb1=%u cb2=%u)\n",
     1414             INSTANCE(pThis), pCtlHdr->u8Command, pElem->nOut, pElem->aSegsOut[1].cb, pElem->aSegsOut[2].cb));
    14281415        return VNET_ERROR;
    14291416    }
     
    14361423    if (pElem->aSegsOut[1].cb < nMacs * sizeof(RTMAC) + sizeof(nMacs))
    14371424    {
    1438         Log(("%s vnetControlMac: The unicast mac segment is too small "
    1439              "(nMacs=%u cb=%u)\n", INSTANCE(pThis), pElem->aSegsOut[1].cb));
     1425        Log(("%s vnetControlMac: The unicast mac segment is too small (nMacs=%u cb=%u)\n",
     1426             INSTANCE(pThis), nMacs, pElem->aSegsOut[1].cb));
    14401427        return VNET_ERROR;
    14411428    }
     
    14431430    if (nMacs > VNET_MAC_FILTER_LEN)
    14441431    {
    1445         Log(("%s vnetControlMac: MAC table is too big, have to use promiscuous"
    1446              " mode (nMacs=%u)\n", INSTANCE(pThis), nMacs));
     1432        Log(("%s vnetControlMac: MAC table is too big, have to use promiscuous mode (nMacs=%u)\n", INSTANCE(pThis), nMacs));
    14471433        pThis->fPromiscuous = true;
    14481434    }
     
    14681454    if (pElem->aSegsOut[2].cb < nMacs * sizeof(RTMAC) + sizeof(nMacs))
    14691455    {
    1470         Log(("%s vnetControlMac: The multicast mac segment is too small "
    1471              "(nMacs=%u cb=%u)\n", INSTANCE(pThis), pElem->aSegsOut[2].cb));
     1456        Log(("%s vnetControlMac: The multicast mac segment is too small (nMacs=%u cb=%u)\n",
     1457             INSTANCE(pThis), nMacs, pElem->aSegsOut[2].cb));
    14721458        return VNET_ERROR;
    14731459    }
     
    14751461    if (nMacs > VNET_MAC_FILTER_LEN - pThis->nMacFilterEntries)
    14761462    {
    1477         Log(("%s vnetControlMac: MAC table is too big, have to use allmulti"
    1478              " mode (nMacs=%u)\n", INSTANCE(pThis), nMacs));
     1463        Log(("%s vnetControlMac: MAC table is too big, have to use allmulti mode (nMacs=%u)\n", INSTANCE(pThis), nMacs));
    14791464        pThis->fAllMulti = true;
    14801465    }
     
    15051490    if (pElem->nOut != 2 || pElem->aSegsOut[1].cb != sizeof(u16Vid))
    15061491    {
    1507         Log(("%s vnetControlVlan: Segment layout is wrong "
    1508              "(u8Command=%u nOut=%u cb=%u)\n", INSTANCE(pThis),
    1509              pCtlHdr->u8Command, pElem->nOut, pElem->aSegsOut[1].cb));
     1492        Log(("%s vnetControlVlan: Segment layout is wrong (u8Command=%u nOut=%u cb=%u)\n",
     1493             INSTANCE(pThis), pCtlHdr->u8Command, pElem->nOut, pElem->aSegsOut[1].cb));
    15101494        return VNET_ERROR;
    15111495    }
     
    15171501    if (u16Vid >= VNET_MAX_VID)
    15181502    {
    1519         Log(("%s vnetControlVlan: VLAN ID is out of range "
    1520              "(VID=%u)\n", INSTANCE(pThis), u16Vid));
     1503        Log(("%s vnetControlVlan: VLAN ID is out of range (VID=%u)\n", INSTANCE(pThis), u16Vid));
    15211504        return VNET_ERROR;
    15221505    }
    15231506
    1524     Log(("%s vnetControlVlan: uCommand=%u VID=%u\n", INSTANCE(pThis),
    1525          pCtlHdr->u8Command, u16Vid));
     1507    Log(("%s vnetControlVlan: uCommand=%u VID=%u\n", INSTANCE(pThis), pCtlHdr->u8Command, u16Vid));
    15261508
    15271509    switch (pCtlHdr->u8Command)
     
    15511533        if (elem.nOut < 1 || elem.aSegsOut[0].cb < sizeof(VNETCTLHDR))
    15521534        {
    1553             Log(("%s vnetQueueControl: The first 'out' segment is not the "
    1554                  "header! (%u < 1 || %u < %u).\n", INSTANCE(pThis), elem.nOut,
    1555                  elem.aSegsOut[0].cb,sizeof(VNETCTLHDR)));
     1535            Log(("%s vnetQueueControl: The first 'out' segment is not the header! (%u < 1 || %u < %u).\n",
     1536                 INSTANCE(pThis), elem.nOut, elem.aSegsOut[0].cb,sizeof(VNETCTLHDR)));
    15561537            break; /* Skip the element and hope the next one is good. */
    15571538        }
     
    15591540                 || elem.aSegsIn[elem.nIn - 1].cb < sizeof(VNETCTLACK))
    15601541        {
    1561             Log(("%s vnetQueueControl: The last 'in' segment is too small "
    1562                  "to hold the acknowledge! (%u < 1 || %u < %u).\n",
    1563                  INSTANCE(pThis), elem.nIn, elem.aSegsIn[elem.nIn - 1].cb,
    1564                  sizeof(VNETCTLACK)));
     1542            Log(("%s vnetQueueControl: The last 'in' segment is too small to hold the acknowledge! (%u < 1 || %u < %u).\n",
     1543                 INSTANCE(pThis), elem.nIn, elem.aSegsIn[elem.nIn - 1].cb, sizeof(VNETCTLACK)));
    15651544            break; /* Skip the element and hope the next one is good. */
    15661545        }
     
    15851564                    u8Ack = VNET_ERROR;
    15861565            }
    1587             Log(("%s Processed control message %u, ack=%u.\n", INSTANCE(pThis),
    1588                  CtlHdr.u8Class, u8Ack));
     1566            Log(("%s Processed control message %u, ack=%u.\n", INSTANCE(pThis), CtlHdr.u8Class, u8Ack));
    15891567            PDMDevHlpPCIPhysWrite(pThis->VPCI.CTX_SUFF(pDevIns),
    15901568                                  elem.aSegsIn[elem.nIn - 1].addr,
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