VirtualBox

Changeset 15914 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Jan 13, 2009 1:29:45 PM (16 years ago)
Author:
vboxsync
Message:

NAT: temporally enable intermediate buffer on send, to avoid overhead on creating queue entry.

Location:
trunk/src/VBox/Devices/Network
Files:
2 edited

Legend:

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

    r15890 r15914  
    510510    rc = pThis->pPort->pfnReceive(pThis->pPort, pItem->pu8Buf, pItem->cb);
    511511
     512#if 0
    512513    rc = RTReqAlloc(pThis->pReqQueue, &pReq, RTREQTYPE_INTERNAL);
    513514    AssertReleaseRC(rc);
     
    518519    pReq->fFlags              = RTREQFLAGS_VOID;
    519520    AssertRC(rc);
     521#else
     522    /*Copy buffer again, till seeking good way of syncronization with slirp mbuf management code*/
     523    AssertRelease(pItem->mbuf == NULL);
     524    RTMemFree((void *)pItem->pu8Buf);
     525#endif
    520526    return RT_SUCCESS(rc);
    521527}
  • trunk/src/VBox/Devices/Network/slirp/slirp.c

    r15891 r15914  
    11141114#ifdef VBOX_WITH_SIMPLIFIED_SLIRP_SYNC
    11151115    struct ethhdr *eh;
     1116    uint8_t *buf = RTMemAlloc(1600);
    11161117    m->m_data -= if_maxlinkhdr;
    11171118    m->m_len += ETH_HLEN;
     
    11341135#ifdef VBOX_WITH_SIMPLIFIED_SLIRP_SYNC
    11351136    eh->h_proto = htons(eth_proto);
     1137#if 0
    11361138    slirp_output(pData->pvUser, m, mtod(m, uint8_t *), m->m_len);
     1139#else
     1140    memcpy(buf, mtod(m, uint8_t *), m->m_len);
     1141    slirp_output(pData->pvUser, NULL, buf, m->m_len);
     1142    m_free(pData, m);
     1143#endif
    11371144#else
    11381145    eh->h_proto = htons(ETH_P_IP);
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