VirtualBox

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


Ignore:
Timestamp:
Jul 13, 2009 8:46:12 AM (16 years ago)
Author:
vboxsync
Message:

PCNet: Don't flood the release log with errors

File:
1 edited

Legend:

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

    r21363 r21522  
    259259    RCPTRTYPE(PPCNETGUESTSHAREDMEMORY)  pSharedMMIORC;
    260260
    261 #if HC_ARCH_BITS == 64
    262     uint32_t                            Alignment6;
    263 #endif
     261    /** Error counter for bad receive descriptors. */
     262    uint32_t                            uCntBadRMD;
    264263
    265264    /** True if host and guest admitted to use the private interface. */
     
    17241723            {
    17251724                STAM_PROFILE_ADV_STOP(&pThis->CTXSUFF(StatRdtePoll), a);
    1726                 /* This is not problematic since we don't own the descriptor */
    1727                 LogRel(("PCNet#%d: BAD RMD ENTRIES AT %#010x (i=%d)\n",
    1728                         PCNET_INST_NR, addr, i));
     1725                /* This is not problematic since we don't own the descriptor
     1726                 * We actually do own it, otherwise pcnetRmdLoad would have returned false.
     1727                 * Don't flood the release log with errors.
     1728                 */
     1729                if (++pThis->uCntBadRMD < 50)
     1730                    LogRel(("PCNet#%d: BAD RMD ENTRIES AT %#010x (i=%d)\n",
     1731                            PCNET_INST_NR, addr, i));
    17291732                return;
    17301733            }
     
    17541757        {
    17551758            STAM_PROFILE_ADV_STOP(&pThis->CTXSUFF(StatRdtePoll), a);
    1756             /* This is not problematic since we don't own the descriptor */
    1757             LogRel(("PCNet#%d: BAD RMD ENTRIES + AT %#010x (i=%d)\n",
    1758                     PCNET_INST_NR, addr, i));
     1759            /* This is not problematic since we don't own the descriptor
     1760             * We actually do own it, otherwise pcnetRmdLoad would have returned false.
     1761             * Don't flood the release log with errors.
     1762             */
     1763            if (++pThis->uCntBadRMD < 50)
     1764                LogRel(("PCNet#%d: BAD RMD ENTRIES + AT %#010x (i=%d)\n",
     1765                        PCNET_INST_NR, addr, i));
    17591766            return;
    17601767        }
     
    31953202    pThis->aBCR[BCR_PCISVID] = PCIDevGetSubSystemVendorId(&pThis->PciDev);
    31963203
     3204    /* Reset the error counter. */
     3205    pThis->uCntBadRMD      = 0;
     3206
    31973207    pcnetSoftReset(pThis);
    31983208}
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