Lines Matching defs:pSG

256 LOCAL mblk_t *vboxNetFltSolarisMBlkFromSG(PVBOXNETFLTINS pThis, PINTNETSG pSG, uint32_t fDst);
258 LOCAL int vboxNetFltSolarisMBlkToSG(PVBOXNETFLTINS pThis, mblk_t *pMsg, PINTNETSG pSG, unsigned cSegs, uint32_t fSrc);
457 * @param pSG Pointer to the scatter-gather list.
461 LOCAL inline mblk_t *vboxNetFltSolarisMBlkFromSG(PVBOXNETFLTINS pThis, PINTNETSG pSG, uint32_t fDst)
463 Log((DEVICE_NAME ":vboxNetFltSolarisMBlkFromSG pThis=%p pSG=%p\n", pThis, pSG));
465 mblk_t *pMsg = allocb(pSG->cbTotal, BPRI_HI);
468 LogRel((DEVICE_NAME ":vboxNetFltSolarisMBlkFromSG failed to alloc %d bytes for mblk_t.\n", pSG->cbTotal));
476 for (unsigned i = 0; i < pSG->cSegsUsed; i++)
478 if (pSG->aSegs[i].pv)
480 bcopy(pSG->aSegs[i].pv, pMsg->b_wptr, pSG->aSegs[i].cb);
481 pMsg->b_wptr += pSG->aSegs[i].cb;
519 * @param pSG Pointer to the SG.
526 LOCAL int vboxNetFltSolarisMBlkToSG(PVBOXNETFLTINS pThis, mblk_t *pMsg, PINTNETSG pSG, unsigned cSegs, uint32_t fSrc)
528 Log((DEVICE_NAME ":vboxNetFltSolarisMBlkToSG pThis=%p pMsg=%p pSG=%p cSegs=%d\n", pThis, pMsg, pSG, cSegs));
533 IntNetSgInitTempSegs(pSG, 0 /*cbTotal*/, cSegs, 0 /*cSegsUsed*/);
542 pSG->aSegs[iSeg].pv = pvSeg;
543 pSG->aSegs[iSeg].cb = cbSeg;
544 pSG->aSegs[iSeg].Phys = NIL_RTHCPHYS;
545 pSG->cbTotal += cbSeg;
550 pSG->cSegsUsed = iSeg;
553 if (pSG->cbTotal < 60 && (fSrc & INTNETTRUNKDIR_HOST))
558 pSG->aSegs[iSeg].Phys = NIL_RTHCPHYS;
559 pSG->aSegs[iSeg].pv = (void *)&s_abZero[0];
560 pSG->aSegs[iSeg].cb = 60 - pSG->cbTotal;
561 pSG->cbTotal = 60;
562 pSG->cSegsUsed++;
567 Log((DEVICE_NAME ":vboxNetFltSolarisMBlkToSG iSeg=%d pSG->cbTotal=%d msgdsize=%d\n", iSeg, pSG->cbTotal, msgdsize(pMsg)));
691 PINTNETSG pSG = (PINTNETSG)alloca(RT_OFFSETOF(INTNETSG, aSegs[cSegs]));
692 int rc = vboxNetFltSolarisMBlkToSG(pThis, pMsg, pSG, cSegs, fSrc);
694 pThis->pSwitchPort->pfnRecv(pThis->pSwitchPort, NULL, pSG, fSrc);
1433 int vboxNetFltPortOsXmit(PVBOXNETFLTINS pThis, void *pvIfData, PINTNETSG pSG, uint32_t fDst)
1448 mblk_t *pMsg = vboxNetFltSolarisMBlkFromSG(pThis, pSG, fDst);