Changeset 64196 in vbox
- Timestamp:
- Oct 11, 2016 8:31:07 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c
r64195 r64196 87 87 #endif 88 88 89 #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0) 90 # define VBOX_SKB_PAGE(page) page.p 89 #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 5, 0) 90 # define VBOX_SKB_KMAP_FRAG(frag) kmap_atomic(skb_frag_page(frag)) 91 # define VBOX_SKB_KUNMAP_FRAG(vaddr) kunmap_atomic(vaddr) 91 92 #else 92 # define VBOX_SKB_PAGE(page) page 93 # define VBOX_SKB_KMAP_FRAG(frag) kmap_skb_frag(frag) 94 # define VBOX_SKB_KUNMAP_FRAG(vaddr) kunmap_skb_frag(vaddr) 93 95 #endif 94 96 … … 906 908 skb_frag_t *pFrag = &skb_shinfo(pBuf)->frags[i]; 907 909 pSG->aSegs[iSeg].cb = pFrag->size; 908 pSG->aSegs[iSeg].pv = kmap_atomic(VBOX_SKB_PAGE(pFrag->page)) + pFrag->page_offset;910 pSG->aSegs[iSeg].pv = VBOX_SKB_KMAP_FRAG(pFrag) + pFrag->page_offset; 909 911 Log6((" %p", pSG->aSegs[iSeg].pv)); 910 912 pSG->aSegs[iSeg++].Phys = NIL_RTHCPHYS; … … 922 924 skb_frag_t *pFrag = &skb_shinfo(pFragBuf)->frags[i]; 923 925 pSG->aSegs[iSeg].cb = pFrag->size; 924 pSG->aSegs[iSeg].pv = kmap_atomic(VBOX_SKB_PAGE(pFrag->page)) + pFrag->page_offset;926 pSG->aSegs[iSeg].pv = VBOX_SKB_KMAP_FRAG(pFrag) + pFrag->page_offset; 925 927 Log6((" %p", pSG->aSegs[iSeg].pv)); 926 928 pSG->aSegs[iSeg++].Phys = NIL_RTHCPHYS; … … 1164 1166 { 1165 1167 Log6((" %p", pSG->aSegs[iSeg].pv)); 1166 kunmap_atomic(pSG->aSegs[iSeg++].pv);1168 VBOX_SKB_KUNMAP_FRAG(pSG->aSegs[iSeg++].pv); 1167 1169 } 1168 1170 struct sk_buff *pFragBuf; … … 1173 1175 { 1174 1176 Log6((" %p", pSG->aSegs[iSeg].pv)); 1175 kunmap_atomic(pSG->aSegs[iSeg++].pv);1177 VBOX_SKB_KUNMAP_FRAG(pSG->aSegs[iSeg++].pv); 1176 1178 } 1177 1179 }
Note:
See TracChangeset
for help on using the changeset viewer.