Lines Matching refs:pSG

401  * @param   pSG             The (scatter/)gather list.
403 static mbuf_t vboxNetFltDarwinMBufFromSG(PVBOXNETFLTINS pThis, PINTNETSG pSG)
413 Assert(!pSG->pvUserData || pSG->pvUserData == pThis);
414 Assert(!pSG->pvUserData2);
415 pSG->pvUserData = pThis;
439 errno_t err = mbuf_allocpacket(How, pSG->cbTotal, NULL, &pPkt);
449 mbuf_pkthdr_setlen(pPkt, pSG->cbTotal);
454 && mbuf_maxlen(pCur) >= pSG->cbTotal)
456 mbuf_setlen(pCur, pSG->cbTotal);
457 IntNetSgRead(pSG, mbuf_data(pCur));
462 size_t cbLeft = pSG->cbTotal;
470 IntNetSgReadEx(pSG, offSrc, cb, mbuf_data(pCur));
488 Assert(pSG->aSegs[0].cb >= sizeof(pTagData->EthHdr));
489 memcpy(&pTagData->EthHdr, pSG->aSegs[0].pv, sizeof(pTagData->EthHdr));
501 pSG->pvUserData = NULL;
556 * @param pSG The SG.
562 DECLINLINE(void) vboxNetFltDarwinMBufToSG(PVBOXNETFLTINS pThis, mbuf_t pMBuf, void *pvFrame, PINTNETSG pSG, unsigned cSegs, uint32_t fSrc)
570 IntNetSgInitTempSegs(pSG, 0 /*cbTotal*/, cSegs, 0 /*cSegsUsed*/);
598 pSG->cbTotal += cbSeg;
599 pSG->aSegs[iSeg].cb = cbSeg;
600 pSG->aSegs[iSeg].pv = pvSeg;
601 pSG->aSegs[iSeg].Phys = NIL_RTHCPHYS;
610 pSG->cbTotal += cbSeg;
611 pSG->aSegs[iSeg].cb = cbSeg;
612 pSG->aSegs[iSeg].pv = pvFrame;
613 pSG->aSegs[iSeg].Phys = NIL_RTHCPHYS;
620 pSG->cSegsUsed = iSeg;
630 if (pSG->cbTotal < 60 && (fSrc & INTNETTRUNKDIR_HOST))
635 pSG->aSegs[iSeg].Phys = NIL_RTHCPHYS;
636 pSG->aSegs[iSeg].pv = (void *)&s_abZero[0];
637 pSG->aSegs[iSeg].cb = 60 - pSG->cbTotal;
638 pSG->cbTotal = 60;
639 pSG->cSegsUsed++;
647 if (pSG->cSegsUsed < pSG->cSegsAlloc)
650 int iSrc = pSG->cSegsUsed;
651 int iDst = pSG->cSegsAlloc;
656 pSG->aSegs[iDst] = pSG->aSegs[iSrc];
660 pSG->cSegsUsed = pSG->cSegsAlloc;
664 && iDst < pSG->cSegsAlloc)
666 pSG->aSegs[iDst].Phys = NIL_RTHCPHYS;
667 pSG->aSegs[iDst].pv = pSG->aSegs[iSrc].pv;
668 pSG->aSegs[iDst].cb = RT_MIN(pSG->aSegs[iSrc].cb, VBOXNETFLT_DARWIN_TEST_SEG_SIZE);
669 if (pSG->aSegs[iDst].cb != pSG->aSegs[iSrc].cb)
671 pSG->aSegs[iSrc].cb -= pSG->aSegs[iDst].cb;
672 pSG->aSegs[iSrc].pv = (uint8_t *)pSG->aSegs[iSrc].pv + pSG->aSegs[iDst].cb;
674 else if (++iSrc >= pSG->cSegsAlloc)
676 pSG->cSegsUsed = iDst + 1;
913 PINTNETSG pSG = (PINTNETSG)alloca(RT_OFFSETOF(INTNETSG, aSegs[cSegs]));
914 vboxNetFltDarwinMBufToSG(pThis, pMBuf, pvFrame, pSG, cSegs, fSrc);
916 fDropIt = pThis->pSwitchPort->pfnRecv(pThis->pSwitchPort, NULL /* pvIf */, pSG, fSrc);
1106 int vboxNetFltPortOsXmit(PVBOXNETFLTINS pThis, void *pvIfData, PINTNETSG pSG, uint32_t fDst)
1123 mbuf_t pMBuf = vboxNetFltDarwinMBufFromSG(pThis, pSG);
1139 mbuf_t pMBuf = vboxNetFltDarwinMBufFromSG(pThis, pSG);