VirtualBox

Changeset 29234 in vbox for trunk/src/VBox/Devices


Ignore:
Timestamp:
May 8, 2010 8:26:29 AM (15 years ago)
Author:
vboxsync
Message:

tstItnNetR0: extending the testing a bit to try catch the assertion reported a while back (work in progress).

File:
1 edited

Legend:

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

    r28800 r29234  
    203203    INTNETIFHANDLE  hIf;
    204204    RTMAC           Mac;
     205    uint32_t        cbFrame;
    205206    uint64_t        u64Start;
    206207    uint64_t        u64End;
     
    223224/**
    224225 * Send thread.
    225  * This is constantly broadcasting frames to the network.
     226 * This is constantly sending frames to the other interface.
    226227 */
    227228DECLCALLBACK(int) SendThread(RTTHREAD Thread, void *pvArg)
     
    233234     * Send g_cbTransfer of data.
    234235     */
    235     uint8_t         abBuf[4096] = {0};
     236    uint8_t         abBuf[16384] = {0};
    236237    MYFRAMEHDR     *pHdr    = (MYFRAMEHDR *)&abBuf[0];
    237238    uint32_t        iFrame  = 0;
     
    246247    for (; cbSent < g_cbTransfer; iFrame++)
    247248    {
    248         const unsigned cb = iFrame % 1519 + sizeof(RTMAC) * 2 + sizeof(unsigned);
    249          pHdr->iFrame = iFrame;
     249        const unsigned cb = pArgs->cbFrame
     250                          ? pArgs->cbFrame
     251                          : iFrame % 1519 + sizeof(RTMAC) * 2 + sizeof(unsigned);
     252        pHdr->iFrame = iFrame;
    250253
    251254        INTNETSG Sg;
     
    299302        while (IntNetRingHasMoreToRead(&pArgs->pBuf->Recv))
    300303        {
    301             uint8_t     abBuf[16384];
     304            uint8_t     abBuf[16384 + 1024];
    302305            MYFRAMEHDR *pHdr = (MYFRAMEHDR *)&abBuf[0];
    303306            uint32_t    cb   = IntNetRingReadAndSkipFrame(&pArgs->pBuf->Recv, abBuf);
     
    449452 * Do the bi-directional transfer test.
    450453 */
    451 static void tstBidirectionalTransfer(PTSTSTATE pThis)
     454static void tstBidirectionalTransfer(PTSTSTATE pThis, uint32_t cbFrame)
    452455{
    453456    MYARGS Args0;
     
    458461    Args0.Mac.au16[1] = 0;
    459462    Args0.Mac.au16[2] = 0;
     463    Args0.cbFrame     = cbFrame;
    460464
    461465    MYARGS Args1;
     
    466470    Args1.Mac.au16[1] = 0;
    467471    Args1.Mac.au16[2] = 1;
     472    Args1.cbFrame     = cbFrame;
    468473
    469474    RTTHREAD ThreadRecv0 = NIL_RTTHREAD;
     
    702707        RTTestISubF("bi-directional benchmark, cbSend=%u, cbRecv=%u, cbTransfer=%u",
    703708                    pThis->pBuf0->cbSend, pThis->pBuf0->cbRecv, g_cbTransfer);
    704         tstBidirectionalTransfer(pThis);
     709        tstBidirectionalTransfer(pThis, 256);
     710
     711        for (uint32_t cbFrame = 64; cbFrame < cbSend - 64; cbFrame += 8)
     712        {
     713            RTTestISubF("bi-directional benchmark, cbSend=%u, cbRecv=%u, cbTransfer=%u, cbFrame=%u",
     714                        pThis->pBuf0->cbSend, pThis->pBuf0->cbRecv, g_cbTransfer, cbFrame);
     715            tstBidirectionalTransfer(pThis, cbFrame);
     716        }
    705717    }
    706718
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