VirtualBox

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


Ignore:
Timestamp:
Jul 8, 2020 5:43:27 PM (4 years ago)
Author:
vboxsync
Message:

PCnet: Disabled NetShaper support (see bugref:9768).

File:
1 edited

Legend:

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

    r85116 r85117  
    446446    STAMPROFILE                         StatTransmitSendR3;
    447447    STAMPROFILE                         StatTransmitSendRZ;
    448     STAMPROFILEADV                      StatTxLenCalcRZ;
    449     STAMPROFILEADV                      StatTxLenCalcR3;
    450448    STAMPROFILEADV                      StatTdtePollRZ;
    451449    STAMPROFILEADV                      StatTdtePollR3;
     
    18811879
    18821880/**
    1883  * Poll Transmit Descriptor Table Entry
    1884  * @return true if transmit descriptors available
    1885  */
    1886 static int pcnetCalcPacketLen(PPDMDEVINS pDevIns, PPCNETSTATE pThis, unsigned cb)
    1887 {
    1888     TMD tmd;
    1889     unsigned cbPacket = cb;
    1890     uint32_t iDesc = CSR_XMTRC(pThis);
    1891     uint32_t iFirstDesc = iDesc;
    1892 
    1893     STAM_PROFILE_ADV_START(&pThis->CTX_SUFF_Z(StatTxLenCalc), a);
    1894     do
    1895     {
    1896         /* Advance the ring counter */
    1897         if (iDesc < 2)
    1898             iDesc = CSR_XMTRL(pThis);
    1899         else
    1900             iDesc--;
    1901 
    1902         if (iDesc == iFirstDesc)
    1903             break;
    1904 
    1905         RTGCPHYS32 addrDesc = pcnetTdraAddr(pThis, iDesc);
    1906 
    1907         if (!pcnetTmdTryLoad(pDevIns, pThis, &tmd, PHYSADDR(pThis, addrDesc)))
    1908         {
    1909             STAM_PROFILE_ADV_STOP(&pThis->CTX_SUFF_Z(StatTxLenCalc), a);
    1910             /*
    1911              * No need to count further since this packet won't be sent anyway
    1912              * due to underflow.
    1913              */
    1914             Log3(("#%d pcnetCalcPacketLen: underflow, return %u\n", PCNET_INST_NR, cbPacket));
    1915             return cbPacket;
    1916         }
    1917         if (RT_UNLIKELY(tmd.tmd1.ones != 15))
    1918         {
    1919             STAM_PROFILE_ADV_STOP(&pThis->CTX_SUFF_Z(StatTxLenCalc), a);
    1920             LogRel(("PCnet#%d: BAD TMD XDA=%#010x\n",
    1921                     PCNET_INST_NR, PHYSADDR(pThis, addrDesc)));
    1922             Log3(("#%d pcnetCalcPacketLen: bad TMD, return %u\n", PCNET_INST_NR, cbPacket));
    1923             return cbPacket;
    1924         }
    1925         Log3(("#%d pcnetCalcPacketLen: got valid TMD, cb=%u\n", PCNET_INST_NR, 4096 - tmd.tmd1.bcnt));
    1926         cbPacket += 4096 - tmd.tmd1.bcnt;
    1927     } while (!tmd.tmd1.enp);
    1928     STAM_PROFILE_ADV_STOP(&pThis->CTX_SUFF_Z(StatTxLenCalc), a);
    1929 
    1930     Log3(("#%d pcnetCalcPacketLen: return %u\n", PCNET_INST_NR, cbPacket));
    1931     return cbPacket;
    1932 }
    1933 
    1934 
    1935 /**
    19361881 * Write data into guest receive buffers.
    19371882 */
     
    26642609             */
    26652610            unsigned cb = 4096 - tmd.tmd1.bcnt;
    2666             rc = pcnetXmitAllocBuf(pThis, pThisCC, pcnetCalcPacketLen(pDevIns, pThis, cb), fLoopback, &SgLoop, &pSgBuf);
     2611            rc = pcnetXmitAllocBuf(pThis, pThisCC, RT_MAX(MAX_FRAME, cb), fLoopback, &SgLoop, &pSgBuf);
    26672612            if (rc == VERR_TRY_AGAIN)
    26682613            {
     
    54595404    PDMDevHlpSTAMRegister(pDevIns, &pThis->StatTransmitSendRZ,     STAMTYPE_PROFILE, "Transmit/SendRZ",    STAMUNIT_TICKS_PER_CALL,      "Profiling PCnet send transmit in RZ");
    54605405    PDMDevHlpSTAMRegister(pDevIns, &pThis->StatTransmitSendR3,     STAMTYPE_PROFILE, "Transmit/SendR3",    STAMUNIT_TICKS_PER_CALL,      "Profiling PCnet send transmit in R3");
    5461     PDMDevHlpSTAMRegister(pDevIns, &pThis->StatTxLenCalcRZ,        STAMTYPE_PROFILE, "Transmit/LenCalcRZ", STAMUNIT_TICKS_PER_CALL,      "Profiling PCnet TX len calc in RZ");
    5462     PDMDevHlpSTAMRegister(pDevIns, &pThis->StatTxLenCalcR3,        STAMTYPE_PROFILE, "Transmit/LenCalcR3", STAMUNIT_TICKS_PER_CALL,      "Profiling PCnet TX len calc in R3");
    54635406    PDMDevHlpSTAMRegister(pDevIns, &pThis->StatTdtePollRZ,         STAMTYPE_PROFILE, "TdtePollRZ",         STAMUNIT_TICKS_PER_CALL,      "Profiling PCnet TdtePoll in RZ");
    54645407    PDMDevHlpSTAMRegister(pDevIns, &pThis->StatTdtePollR3,         STAMTYPE_PROFILE, "TdtePollR3",         STAMUNIT_TICKS_PER_CALL,      "Profiling PCnet TdtePoll in R3");
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