Changeset 56991 in vbox
- Timestamp:
- Jul 18, 2015 10:48:35 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/DevVirtioNet.cpp
r56292 r56991 677 677 break; 678 678 } 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)); 681 680 RTSemEventWait(pThis->hEventMoreRxDescAvail, cMillies); 682 681 } … … 757 756 if (!memcmp(pThis->config.mac.au8, pvBuf, sizeof(RTMAC))) 758 757 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)); 761 759 762 760 for (unsigned i = 0; i < pThis->nMacFilterEntries; i++) … … 791 789 if (pGso) 792 790 { 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)); 796 793 Hdr.Hdr.u8Flags = VNETHDR_F_NEEDS_CSUM; 797 794 switch (pGso->u8Type) … … 894 891 if (RT_FAILURE(rc)) 895 892 { 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)); 898 894 return rc; 899 895 } … … 902 898 if (uOffset < cb) 903 899 { 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)); 906 901 return VERR_TOO_MUCH_DATA; 907 902 } … … 941 936 if (!uFeatures) 942 937 { 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)); 945 939 return VERR_NOT_SUPPORTED; 946 940 } 947 941 } 948 942 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)); 951 944 int rc = vnetCanReceive(pThis); 952 945 if (RT_FAILURE(rc)) … … 1151 1144 if ((pThis->VPCI.uStatus & VPCI_STATUS_DRV_OK) == 0) 1152 1145 { 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)); 1155 1147 return; 1156 1148 } … … 1174 1166 uHdrLen = sizeof(VNETHDR); 1175 1167 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)); 1178 1170 1179 1171 vpciSetWriteLed(&pThis->VPCI, true); … … 1200 1192 for (unsigned int i = 1; i < elem.nOut; i++) 1201 1193 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)); 1204 1195 Assert(uSize <= VNET_MAX_FRAME_SIZE); 1205 1196 if (pThis->pDrv) … … 1262 1253 INSTANCE(pThis), pGso->cbHdrsTotal)); 1263 1254 } 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)); 1267 1257 STAM_REL_COUNTER_INC(&pThis->StatTransmitGSO); 1268 1258 } … … 1323 1313 { 1324 1314 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))); 1327 1316 vnetTransmitPendingPackets(pThis, pQueue, false /*fOnWorkerThread*/); 1328 1317 if (RT_FAILURE(vnetCsEnter(pThis, VERR_SEM_BUSY))) … … 1363 1352 pThis->u32i++; 1364 1353 Log3(("vnetTxTimer: Expired, diff %9d usec, avg %9d usec, min %9d usec, max %9d usec\n", 1365 1354 u32MicroDiff, pThis->u32AvgDiff, pThis->u32MinDiff, pThis->u32MaxDiff)); 1366 1355 1367 1356 // Log3(("%s vnetTxTimer: Expired\n", INSTANCE(pThis))); … … 1422 1411 || pElem->aSegsOut[2].cb < sizeof(nMacs)) 1423 1412 { 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)); 1428 1415 return VNET_ERROR; 1429 1416 } … … 1436 1423 if (pElem->aSegsOut[1].cb < nMacs * sizeof(RTMAC) + sizeof(nMacs)) 1437 1424 { 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)); 1440 1427 return VNET_ERROR; 1441 1428 } … … 1443 1430 if (nMacs > VNET_MAC_FILTER_LEN) 1444 1431 { 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)); 1447 1433 pThis->fPromiscuous = true; 1448 1434 } … … 1468 1454 if (pElem->aSegsOut[2].cb < nMacs * sizeof(RTMAC) + sizeof(nMacs)) 1469 1455 { 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)); 1472 1458 return VNET_ERROR; 1473 1459 } … … 1475 1461 if (nMacs > VNET_MAC_FILTER_LEN - pThis->nMacFilterEntries) 1476 1462 { 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)); 1479 1464 pThis->fAllMulti = true; 1480 1465 } … … 1505 1490 if (pElem->nOut != 2 || pElem->aSegsOut[1].cb != sizeof(u16Vid)) 1506 1491 { 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)); 1510 1494 return VNET_ERROR; 1511 1495 } … … 1517 1501 if (u16Vid >= VNET_MAX_VID) 1518 1502 { 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)); 1521 1504 return VNET_ERROR; 1522 1505 } 1523 1506 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)); 1526 1508 1527 1509 switch (pCtlHdr->u8Command) … … 1551 1533 if (elem.nOut < 1 || elem.aSegsOut[0].cb < sizeof(VNETCTLHDR)) 1552 1534 { 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))); 1556 1537 break; /* Skip the element and hope the next one is good. */ 1557 1538 } … … 1559 1540 || elem.aSegsIn[elem.nIn - 1].cb < sizeof(VNETCTLACK)) 1560 1541 { 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))); 1565 1544 break; /* Skip the element and hope the next one is good. */ 1566 1545 } … … 1585 1564 u8Ack = VNET_ERROR; 1586 1565 } 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)); 1589 1567 PDMDevHlpPCIPhysWrite(pThis->VPCI.CTX_SUFF(pDevIns), 1590 1568 elem.aSegsIn[elem.nIn - 1].addr,
Note:
See TracChangeset
for help on using the changeset viewer.