VirtualBox

Ignore:
Timestamp:
Apr 7, 2010 6:37:43 AM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
59732
Message:

intnet, VBoxNet*, network device & drivers: GSO preps.

Location:
trunk/src/VBox/HostDrivers/VBoxNetFlt/linux
Files:
2 edited

Legend:

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

    r21682 r28025  
    3434#include <VBox/log.h>
    3535#include <VBox/err.h>
     36#include <VBox/intnetinline.h>
    3637#include <iprt/alloca.h>
    3738#include <iprt/assert.h>
     
    358359
    359360    Assert(!skb_shinfo(pBuf)->frag_list);
    360     pSG->pvOwnerData = NULL;
    361     pSG->pvUserData = NULL;
    362     pSG->pvUserData2 = NULL;
    363     pSG->cUsers = 1;
    364     pSG->fFlags = INTNETSG_FLAGS_TEMP;
    365     pSG->cSegsAlloc = cSegs;
    366 
    367    if (fSrc & INTNETTRUNKDIR_WIRE)
     361
     362    if (fSrc & INTNETTRUNKDIR_WIRE)
    368363    {
    369364        /*
     
    373368        skb_push(pBuf, ETH_HLEN);
    374369    }
    375     pSG->cbTotal = pBuf->len;
     370
     371    INTNETSgInitTempSegs(pSG, pBuf->len, cSegs, 0 /*cSegsUsed*/);
     372
    376373#ifdef VBOXNETFLT_SG_SUPPORT
    377374    pSG->aSegs[0].cb = skb_headlen(pBuf);
     
    387384        pSG->aSegs[i+1].Phys = NIL_RTHCPHYS;
    388385    }
    389     pSG->cSegsUsed = ++i;
     386    ++i;
     387
    390388#else
    391389    pSG->aSegs[0].cb = pBuf->len;
    392390    pSG->aSegs[0].pv = pBuf->data;
    393391    pSG->aSegs[0].Phys = NIL_RTHCPHYS;
    394     pSG->cSegsUsed = i = 1;
    395 #endif
    396 
     392    i = 1;
     393#endif
     394
     395    pSG->cSegsUsed = i;
    397396
    398397#ifdef PADD_RUNT_FRAMES_FROM_HOST
     
    415414        pSG->cbTotal = 60;
    416415        pSG->cSegsUsed++;
    417     }
    418 #endif
     416        Assert(i + 1 <= pSG->cSegsAlloc)
     417    }
     418#endif
     419
    419420    Log4(("vboxNetFltLinuxSkBufToSG: allocated=%d, segments=%d frags=%d next=%p frag_list=%p pkt_type=%x fSrc=%x\n",
    420421          pSG->cSegsAlloc, pSG->cSegsUsed, skb_shinfo(pBuf)->nr_frags, pBuf->next, skb_shinfo(pBuf)->frag_list, pBuf->pkt_type, fSrc));
  • trunk/src/VBox/HostDrivers/VBoxNetFlt/linux/files_vboxnetflt

    • Property svn:eol-style changed from LF to native
    • Property svn:keywords set to Author Date Id Revision
    r25536 r28025  
    11#!/bin/sh
    2 # $Id: $
     2# $Id$
    33## @file
    44# Shared file between Makefile.kmk and export_modules
     
    5555    ${PATH_ROOT}/include/VBox/log.h=>include/VBox/log.h \
    5656    ${PATH_ROOT}/include/VBox/intnet.h=>include/VBox/intnet.h \
     57    ${PATH_ROOT}/include/VBox/intnetinline.h=>include/VBox/intnetinline.h \
    5758    ${PATH_ROOT}/include/VBox/stam.h=>include/VBox/stam.h \
    5859    ${PATH_ROOT}/include/VBox/sup.h=>include/VBox/sup.h \
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette