VirtualBox

Changeset 104046 in vbox for trunk


Ignore:
Timestamp:
Mar 25, 2024 6:02:43 PM (10 months ago)
Author:
vboxsync
Message:

Linux: VBoxNetFlt: Introduce initial support for kernel 6.9, bugref:10630.

File:
1 edited

Legend:

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

    r103789 r104046  
    167167# endif
    168168#endif
     169
     170#if RTLNX_VER_MIN(6,9,0)
     171# define VBOX_SKB_FRAG_LEN(_pFrag)       ((_pFrag)->len)
     172# define VBOX_SKB_FRAG_OFFSET(_pFrag)    ((_pFrag)->offset)
     173#elif RTLNX_VER_MIN(5,4,0) || RTLNX_SUSE_MAJ_PREREQ(15, 2)
     174# define VBOX_SKB_FRAG_LEN(_pFrag)       ((_pFrag)->bv_len)
     175# define VBOX_SKB_FRAG_OFFSET(_pFrag)    ((_pFrag)->bv_offset)
     176#else /* < KERNEL_VERSION(5, 4, 0) */
     177# define VBOX_SKB_FRAG_LEN(_pFrag)       ((_pFrag)->size)
     178# define VBOX_SKB_FRAG_OFFSET(_pFrag)    ((_pFrag)->page_offset)
     179#endif /* > KERNEL_VERSION(6, 9, 0) */
    169180
    170181#if RTLNX_VER_MIN(3,20,0) || RTLNX_RHEL_RANGE(7,2,  8,0) || RTLNX_RHEL_RANGE(6,8,  7,0)
     
    933944    {
    934945        skb_frag_t *pFrag = &skb_shinfo(pBuf)->frags[i];
    935 # if RTLNX_VER_MIN(5,4,0) || RTLNX_SUSE_MAJ_PREREQ(15, 2)
    936         pSG->aSegs[iSeg].cb = pFrag->bv_len;
    937         pSG->aSegs[iSeg].pv = VBOX_SKB_KMAP_FRAG(pFrag) + pFrag->bv_offset;
    938 # else /* < KERNEL_VERSION(5, 4, 0) */
    939         pSG->aSegs[iSeg].cb = pFrag->size;
    940         pSG->aSegs[iSeg].pv = VBOX_SKB_KMAP_FRAG(pFrag) + pFrag->page_offset;
    941 # endif /* >= KERNEL_VERSION(5, 4, 0) */
     946        pSG->aSegs[iSeg].cb = VBOX_SKB_FRAG_LEN(pFrag);
     947        pSG->aSegs[iSeg].pv = VBOX_SKB_KMAP_FRAG(pFrag) + VBOX_SKB_FRAG_OFFSET(pFrag);
    942948        Log6((" %p", pSG->aSegs[iSeg].pv));
    943949        pSG->aSegs[iSeg++].Phys = NIL_RTHCPHYS;
     
    954960        {
    955961            skb_frag_t *pFrag = &skb_shinfo(pFragBuf)->frags[i];
    956 # if RTLNX_VER_MIN(5,4,0) || RTLNX_SUSE_MAJ_PREREQ(15, 2)
    957             pSG->aSegs[iSeg].cb = pFrag->bv_len;
    958             pSG->aSegs[iSeg].pv = VBOX_SKB_KMAP_FRAG(pFrag) + pFrag->bv_offset;
    959 # else /* < KERNEL_VERSION(5, 4, 0) */
    960             pSG->aSegs[iSeg].cb = pFrag->size;
    961             pSG->aSegs[iSeg].pv = VBOX_SKB_KMAP_FRAG(pFrag) + pFrag->page_offset;
    962 # endif /* >= KERNEL_VERSION(5, 4, 0) */
     962            pSG->aSegs[iSeg].cb = VBOX_SKB_FRAG_LEN(pFrag);
     963            pSG->aSegs[iSeg].pv = VBOX_SKB_KMAP_FRAG(pFrag) + VBOX_SKB_FRAG_OFFSET(pFrag);
    963964            Log6((" %p", pSG->aSegs[iSeg].pv));
    964965            pSG->aSegs[iSeg++].Phys = NIL_RTHCPHYS;
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