VirtualBox

Ignore:
Timestamp:
May 7, 2025 7:42:49 AM (3 days ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
168752
Message:

VirtioNet: Temporary code from 7.0 branch for debugging descriptor loop issue ​bugref:10572

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/VirtIO/VirtioCore.h

    r106294 r109188  
    3636#include <iprt/sg.h>
    3737#include <iprt/types.h>
     38
     39/*
     40 * WARNING! NEVER ENABLE IN PRODUCTION BUILDS!
     41 * Enables temporary printouts to release log in descriptor chain handling code.
     42 */
     43//#define VIRTIO_REL_INFO_DUMP 1
    3844
    3945#ifdef LOG_ENABLED
     
    458464    uint16_t                    uIrqMmio;                         /**< The interrupt number when Virtio-over-MMIO is used */
    459465    uint8_t                     uDeviceType;                      /**< The implemented device type for Virtio-over-MMIO   */
     466#ifdef VIRTIO_REL_INFO_DUMP
     467    bool                        fRecovering;
     468    bool                        fTestRecovery;
     469#define VIRTIO_CORE_TRACE_BUF_SIZE (256 /* header */ + 256 * 256 /* buffer*/)
     470    RTTRACEBUF                  hTraceBuf;
     471    uint8_t                     aTraceBuf[VIRTIO_CORE_TRACE_BUF_SIZE];
     472#endif /* VIRTIO_REL_INFO_DUMP */
    460473
    461474    /** @name The locations of the capability structures in PCI config space and the BAR.
     
    782795 */
    783796DECLHIDDEN(uint16_t) virtioCoreVirtqAvailBufCount(PPDMDEVINS pDevIns, PVIRTIOCORE pVirtio, uint16_t uVirtqNbr);
     797
     798#ifdef VIRTIO_REL_INFO_DUMP
     799/**
     800 * Copies all available chains to used ring. Only indices of chains are copied, not the chains
     801 * themselves. This can only be done for virtionet TX ring to work around the issue in NetKVM
     802 * driver, which does not complete NBLs on device reset, if these NBLs are already in 'avail' ring.
     803 *
     804 * @param   pDevIns     The device instance.
     805 * @param   pVirtio     Pointer to the shared virtio state.
     806 * @param   uVirtqNbr   Virtqueue to modify.
     807 */
     808void virtioCorePutAllAvailBufsToUsedRing(PPDMDEVINS pDevIns, PVIRTIOCORE pVirtio, uint16_t uVirtqNbr);
     809#endif /* VIRTIO_REL_INFO_DUMP */
    784810
    785811/**
Note: See TracChangeset for help on using the changeset viewer.

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