VirtualBox

Ignore:
Timestamp:
Jun 16, 2010 5:11:47 PM (14 years ago)
Author:
vboxsync
Message:

VBoxNetFlt-linux.c: nits

File:
1 edited

Legend:

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

    r30143 r30262  
    11051105        /*
    11061106         * We need to set checksum fields even if the packet goes to the host
    1107          * directly as it may be immediately forwared by IP layer.
     1107         * directly as it may be immediately forwared by IP layer @bugref{5020}.
    11081108         */
    1109         {
    1110             Assert(skb_headlen(pPkt) >= pSG->GsoCtx.cbHdrs);
    1111             pPkt->ip_summed  = CHECKSUM_PARTIAL;
     1109        Assert(skb_headlen(pPkt) >= pSG->GsoCtx.cbHdrs);
     1110        pPkt->ip_summed  = CHECKSUM_PARTIAL;
    11121111# if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 22)
    1113             pPkt->csum_start = skb_headroom(pPkt) + pSG->GsoCtx.offHdr2;
    1114             if (fGsoType & (SKB_GSO_TCPV4 | SKB_GSO_TCPV6))
    1115                 pPkt->csum_offset = RT_OFFSETOF(RTNETTCP, th_sum);
    1116             else
    1117                 pPkt->csum_offset = RT_OFFSETOF(RTNETUDP, uh_sum);
     1112        pPkt->csum_start = skb_headroom(pPkt) + pSG->GsoCtx.offHdr2;
     1113        if (fGsoType & (SKB_GSO_TCPV4 | SKB_GSO_TCPV6))
     1114            pPkt->csum_offset = RT_OFFSETOF(RTNETTCP, th_sum);
     1115        else
     1116            pPkt->csum_offset = RT_OFFSETOF(RTNETUDP, uh_sum);
    11181117# else
    1119             pPkt->h.raw = pPkt->data + pSG->GsoCtx.offHdr2;
    1120             if (fGsoType & (SKB_GSO_TCPV4 | SKB_GSO_TCPV6))
    1121                 pPkt->csum = RT_OFFSETOF(RTNETTCP, th_sum);
    1122             else
    1123                 pPkt->csum = RT_OFFSETOF(RTNETUDP, uh_sum);
     1118        pPkt->h.raw = pPkt->data + pSG->GsoCtx.offHdr2;
     1119        if (fGsoType & (SKB_GSO_TCPV4 | SKB_GSO_TCPV6))
     1120            pPkt->csum = RT_OFFSETOF(RTNETTCP, th_sum);
     1121        else
     1122            pPkt->csum = RT_OFFSETOF(RTNETUDP, uh_sum);
    11241123# endif
    1125         }
    11261124        if (!fDstWire)
    11271125            PDMNetGsoPrepForDirectUse(&pSG->GsoCtx, pPkt->data, pSG->cbTotal, false /*fPayloadChecksum*/);
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