Changeset 64195 in vbox for trunk/src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c
- Timestamp:
- Oct 11, 2016 7:45:50 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c
r64194 r64195 87 87 #endif 88 88 89 #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0) 90 # define VBOX_SKB_PAGE(page) page.p 91 #else 92 # define VBOX_SKB_PAGE(page) page 93 #endif 94 89 95 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 34) 90 96 # define VBOX_NETDEV_NAME(dev) netdev_name(dev) … … 104 110 # define VBOX_SKB_RESET_NETWORK_HDR(skb) skb_reset_network_header(skb) 105 111 # define VBOX_SKB_RESET_MAC_HDR(skb) skb_reset_mac_header(skb) 112 # define VBOX_SKB_CSUM_OFFSET(skb) skb->csum_offset 106 113 #else 107 114 # define VBOX_SKB_RESET_NETWORK_HDR(skb) skb->nh.raw = skb->data 108 115 # define VBOX_SKB_RESET_MAC_HDR(skb) skb->mac.raw = skb->data 116 # define VBOX_SKB_CSUM_OFFSET(skb) skb->csum 109 117 #endif 110 118 … … 853 861 { 854 862 unsigned uCsumStartOffset = vboxNetFltLinuxGetChecksumStartOffset(pBuf); 855 unsigned uCsumStoreOffset = uCsumStartOffset + pBuf->csum_offset- cbConsumed;863 unsigned uCsumStoreOffset = uCsumStartOffset + VBOX_SKB_CSUM_OFFSET(pBuf) - cbConsumed; 856 864 Log3(("cbConsumed=%u cbProduced=%u uCsumStartOffset=%u uCsumStoreOffset=%u\n", 857 865 cbConsumed, cbProduced, uCsumStartOffset, uCsumStoreOffset)); … … 898 906 skb_frag_t *pFrag = &skb_shinfo(pBuf)->frags[i]; 899 907 pSG->aSegs[iSeg].cb = pFrag->size; 900 pSG->aSegs[iSeg].pv = kmap_atomic( pFrag->page.p) + pFrag->page_offset;908 pSG->aSegs[iSeg].pv = kmap_atomic(VBOX_SKB_PAGE(pFrag->page)) + pFrag->page_offset; 901 909 Log6((" %p", pSG->aSegs[iSeg].pv)); 902 910 pSG->aSegs[iSeg++].Phys = NIL_RTHCPHYS; … … 914 922 skb_frag_t *pFrag = &skb_shinfo(pFragBuf)->frags[i]; 915 923 pSG->aSegs[iSeg].cb = pFrag->size; 916 pSG->aSegs[iSeg].pv = kmap_atomic( pFrag->page.p) + pFrag->page_offset;924 pSG->aSegs[iSeg].pv = kmap_atomic(VBOX_SKB_PAGE(pFrag->page)) + pFrag->page_offset; 917 925 Log6((" %p", pSG->aSegs[iSeg].pv)); 918 926 pSG->aSegs[iSeg++].Phys = NIL_RTHCPHYS; … … 1101 1109 if (pBuf->ip_summed == CHECKSUM_PARTIAL && pBuf->pkt_type == PACKET_OUTGOING) 1102 1110 { 1103 *pcbTemp = vboxNetFltLinuxGetChecksumStartOffset(pBuf) + pBuf->csum_offset+ sizeof(uint16_t);1111 *pcbTemp = vboxNetFltLinuxGetChecksumStartOffset(pBuf) + VBOX_SKB_CSUM_OFFSET(pBuf) + sizeof(uint16_t); 1104 1112 } 1105 1113 # if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
Note:
See TracChangeset
for help on using the changeset viewer.