VirtualBox

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


Ignore:
Timestamp:
Dec 15, 2021 9:03:29 PM (3 years ago)
Author:
vboxsync
Message:

Fix error handling bug and a few typos

File:
1 edited

Legend:

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

    r92950 r92951  
    19681968    /*
    19691969     * Try to do fast (e.g. single-buffer) copy to guest, even if MRG_RXBUF feature is enabled
    1970      * If
    19711970     */
    19721971    STAM_PROFILE_START(&pThis->StatReceiveStore, a);
     
    19771976        pRxPktHdr->uNumBuffers = 1;
    19781977        rc = virtioCoreR3VirtqUsedBufPut(pDevIns, &pThis->Virtio, pRxVirtq->uIdx, cbPktHdr,  pRxPktHdr, pVirtqBuf, 0  /* cbEnqueue */);
    1979         AssertMsgReturn(rc == VINF_SUCCESS, ("%Rrc\n", rc), rc);
    1980         rc = virtioCoreR3VirtqUsedBufPut(pDevIns, &pThis->Virtio, pRxVirtq->uIdx, cb, pvBuf, pVirtqBuf, cbPktHdr + cb /* cbEnqueue */);
    1981         AssertMsgReturn(rc == VINF_SUCCESS, ("%Rrc\n", rc), rc);
     1978        if (rc == VINF_SUCCESS)
     1979            rc = virtioCoreR3VirtqUsedBufPut(pDevIns, &pThis->Virtio, pRxVirtq->uIdx, cb, pvBuf, pVirtqBuf, cbPktHdr + cb /* cbEnqueue */);
    19821980        virtioCoreR3VirtqBufRelease(&pThis->Virtio, pVirtqBuf);
    19831981        virtioCoreVirtqUsedRingSync(pDevIns, &pThis->Virtio, pRxVirtq->uIdx);
     1982        AssertMsgReturn(rc == VINF_SUCCESS, ("%Rrc\n", rc), rc);
    19841983    }
    19851984    else
     
    23732372 * This function handles all parts of the host-side of the ctrlq round-trip buffer processing.
    23742373 *
    2375  * Invoked by worker for virtio-net defince control queue to process a queued control command buffer.
     2374 * Invoked by worker for virtio-net control queue to process a queued control command buffer.
    23762375 *
    23772376 * @param pDevIns       PDM device instance
     
    33273326 * Case in point: According to VirtIO 0.95 ("legacy") specification, section 2.2.1, "historically"
    33283327 * drivers may start driving prior to feature negotiation and prior to drivers setting DRIVER_OK
    3329  * status, "provided driver doesn't use features that alter early use of this device".  That
    3330  * is Interpreted here to mean a virtio-net driver must respect default settings (such as implicit
    3331  * pkt header default size, as determined per Note 1 below).
     3328 * status, "provided driver doesn't use features that alter early use of this device".  Interpreted
     3329 * here to mean a virtio-net driver must respect default settings (such as implicit pkt header default
     3330 * size, as determined per Note 1 below).
    33323331 *
    33333332 * ----------------------------------------------------------------------------------------------
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