VirtualBox

Changeset 28095 in vbox


Ignore:
Timestamp:
Apr 8, 2010 2:44:41 PM (15 years ago)
Author:
vboxsync
Message:

DrvIntNet.cpp,VBox/param.h: Adjusted the Send buffer so it can fit a 64KB frame. Added VBOX_MAX_GSO_SIZE.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/param.h

    r22594 r28095  
    156156/** @} */
    157157
     158
     159/** @defgroup grp_vbox_param_misc  Misc
     160 * @{ */
     161
     162#define VBOX_MAX_GSO_SIZE           0xfff0
     163
     164/** @} */
     165
     166
    158167/** @} */
    159168
  • trunk/src/VBox/Devices/Network/DrvIntNet.cpp

    r28060 r28095  
    3333#include <VBox/err.h>
    3434
     35#include <VBox/param.h>
    3536#include <VBox/log.h>
    3637#include <iprt/asm.h>
     
    11201121        OpenReq.fFlags |= INTNET_OPEN_FLAGS_SHARED_MAC_ON_WIRE;
    11211122
    1122     /** @cfgm{ReceiveBufferSize, uint32_t, 218 KB}
     1123    /** @cfgm{ReceiveBufferSize, uint32_t, 318 KB}
    11231124     * The size of the receive buffer.
    11241125     */
    11251126    rc = CFGMR3QueryU32(pCfg, "ReceiveBufferSize", &OpenReq.cbRecv);
    11261127    if (rc == VERR_CFGM_VALUE_NOT_FOUND)
    1127         OpenReq.cbRecv = 218 * _1K ;
     1128        OpenReq.cbRecv = 318 * _1K ;
    11281129    else if (RT_FAILURE(rc))
    11291130        return PDMDRV_SET_ERROR(pDrvIns, rc,
    11301131                                N_("Configuration error: Failed to get the \"ReceiveBufferSize\" value"));
    11311132
    1132     /** @cfgm{SendBufferSize, uint32_t, 36 KB}
     1133    /** @cfgm{SendBufferSize, uint32_t, 196 KB}
    11331134     * The size of the send (transmit) buffer.
    11341135     * This should be more than twice the size of the larges frame size because
     
    11401141    rc = CFGMR3QueryU32(pCfg, "SendBufferSize", &OpenReq.cbSend);
    11411142    if (rc == VERR_CFGM_VALUE_NOT_FOUND)
    1142         OpenReq.cbSend = 36*_1K;
     1143        OpenReq.cbSend = RT_ALIGN_Z(VBOX_MAX_GSO_SIZE * 3, _1K);
    11431144    else if (RT_FAILURE(rc))
    11441145        return PDMDRV_SET_ERROR(pDrvIns, rc,
    11451146                                N_("Configuration error: Failed to get the \"SendBufferSize\" value"));
    1146     if (OpenReq.cbSend < 32)
     1147    if (OpenReq.cbSend < 128)
    11471148        return PDMDRV_SET_ERROR(pDrvIns, rc,
    11481149                                N_("Configuration error: The \"SendBufferSize\" value is too small"));
    1149     if (OpenReq.cbSend < 16384*2 + 64)
    1150         LogRel(("DrvIntNet: Warning! SendBufferSize=%u, Recommended minimum size %u butes.\n", OpenReq.cbSend, 16384*2 + 64));
     1150    if (OpenReq.cbSend < VBOX_MAX_GSO_SIZE * 4)
     1151        LogRel(("DrvIntNet: Warning! SendBufferSize=%u, Recommended minimum size %u butes.\n", OpenReq.cbSend, VBOX_MAX_GSO_SIZE * 4));
    11511152
    11521153    /** @cfgm{IsService, boolean, true}
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