- Timestamp:
- Mar 25, 2024 6:02:43 PM (10 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c
r103789 r104046 167 167 # endif 168 168 #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) */ 169 180 170 181 #if RTLNX_VER_MIN(3,20,0) || RTLNX_RHEL_RANGE(7,2, 8,0) || RTLNX_RHEL_RANGE(6,8, 7,0) … … 933 944 { 934 945 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); 942 948 Log6((" %p", pSG->aSegs[iSeg].pv)); 943 949 pSG->aSegs[iSeg++].Phys = NIL_RTHCPHYS; … … 954 960 { 955 961 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); 963 964 Log6((" %p", pSG->aSegs[iSeg].pv)); 964 965 pSG->aSegs[iSeg++].Phys = NIL_RTHCPHYS;
Note:
See TracChangeset
for help on using the changeset viewer.