VirtualBox

Changeset 64196 in vbox


Ignore:
Timestamp:
Oct 11, 2016 8:31:07 AM (8 years ago)
Author:
vboxsync
Message:

NetFlt/Linux (bugref:8599) More build fixes for r111185

File:
1 edited

Legend:

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

    r64195 r64196  
    8787#endif
    8888
    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)
    9192#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)
    9395#endif
    9496
     
    906908        skb_frag_t *pFrag = &skb_shinfo(pBuf)->frags[i];
    907909        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;
    909911        Log6((" %p", pSG->aSegs[iSeg].pv));
    910912        pSG->aSegs[iSeg++].Phys = NIL_RTHCPHYS;
     
    922924            skb_frag_t *pFrag = &skb_shinfo(pFragBuf)->frags[i];
    923925            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;
    925927            Log6((" %p", pSG->aSegs[iSeg].pv));
    926928            pSG->aSegs[iSeg++].Phys = NIL_RTHCPHYS;
     
    11641166    {
    11651167        Log6((" %p", pSG->aSegs[iSeg].pv));
    1166         kunmap_atomic(pSG->aSegs[iSeg++].pv);
     1168        VBOX_SKB_KUNMAP_FRAG(pSG->aSegs[iSeg++].pv);
    11671169    }
    11681170    struct sk_buff *pFragBuf;
     
    11731175        {
    11741176            Log6((" %p", pSG->aSegs[iSeg].pv));
    1175             kunmap_atomic(pSG->aSegs[iSeg++].pv);
     1177            VBOX_SKB_KUNMAP_FRAG(pSG->aSegs[iSeg++].pv);
    11761178        }
    11771179    }
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