VirtualBox

Ignore:
Timestamp:
Apr 7, 2010 11:20:09 PM (15 years ago)
Author:
vboxsync
Message:

VBoxNetFlt: Deal with multi segment SG buffers. TODO: One weird windows code path.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c

    r28069 r28070  
    317317    /* Copy the segments. */
    318318    skb_put(pPkt, pSG->cbTotal);
    319     memcpy(pPkt->data, pSG->aSegs[0].pv, pSG->aSegs[0].cb);
    320     if (pSG->cSegsUsed > 1)
    321     {
    322         uint8_t *pbDst = (uint8_t *)pPkt->data + pSG->aSegs[0].cb;
    323         size_t   iSeg  = 0;
    324         while (++iSeg < pSG->cSegsUsed)
    325         {
    326             memcpy(pbDst, pSG->aSegs[iSeg].pv, pSG->aSegs[iSeg].cb);
    327             pbDst += pSG->aSegs[iSeg].cb;
    328             Assert((uintptr_t)pbDst - (uintptr_t)pPkt->data <= pSG->cbTotal);
    329         }
    330     }
     319    INTNETSgRead(pSG, pPkt->data);
    331320
    332321    /* Set protocol and packet_type fields. */
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