Lines Matching defs:pSG
374 static mblk_t *vboxNetFltSolarisMBlkFromSG(PVBOXNETFLTINS pThis, PINTNETSG pSG, uint32_t fDst);
376 static int vboxNetFltSolarisMBlkToSG(PVBOXNETFLTINS pThis, mblk_t *pMsg, PINTNETSG pSG, unsigned cSegs, uint32_t fSrc);
2853 * @param pSG Pointer to the scatter-gather list.
2855 static mblk_t *vboxNetFltSolarisMBlkFromSG(PVBOXNETFLTINS pThis, PINTNETSG pSG, uint32_t fDst)
2857 LogFunc((DEVICE_NAME ":vboxNetFltSolarisMBlkFromSG pThis=%p pSG=%p\n", pThis, pSG));
2859 mblk_t *pMsg = allocb(pSG->cbTotal, BPRI_MED);
2862 LogRel((DEVICE_NAME ":vboxNetFltSolarisMBlkFromSG failed to alloc %d bytes for mblk_t.\n", pSG->cbTotal));
2870 for (unsigned i = 0; i < pSG->cSegsUsed; i++)
2872 if (pSG->aSegs[i].pv)
2874 bcopy(pSG->aSegs[i].pv, pMsg->b_wptr, pSG->aSegs[i].cb);
2875 pMsg->b_wptr += pSG->aSegs[i].cb;
2914 * @param pSG Pointer to the SG.
2919 static int vboxNetFltSolarisMBlkToSG(PVBOXNETFLTINS pThis, mblk_t *pMsg, PINTNETSG pSG, unsigned cSegs, uint32_t fSrc)
2921 LogFunc((DEVICE_NAME ":vboxNetFltSolarisMBlkToSG pThis=%p pMsg=%p pSG=%p cSegs=%d\n", pThis, pMsg, pSG, cSegs));
2926 IntNetSgInitTempSegs(pSG, 0 /*cbTotal*/, cSegs, 0 /*cSegsUsed*/);
2935 pSG->aSegs[iSeg].pv = pvSeg;
2936 pSG->aSegs[iSeg].cb = cbSeg;
2937 pSG->aSegs[iSeg].Phys = NIL_RTHCPHYS;
2938 pSG->cbTotal += cbSeg;
2943 pSG->cSegsUsed = iSeg;
2946 if (pSG->cbTotal < 60 && (fSrc & INTNETTRUNKDIR_HOST))
2951 pSG->aSegs[iSeg].Phys = NIL_RTHCPHYS;
2952 pSG->aSegs[iSeg].pv = (void *)&s_abZero[0];
2953 pSG->aSegs[iSeg].cb = 60 - pSG->cbTotal;
2954 pSG->cbTotal = 60;
2955 pSG->cSegsUsed++;
2960 Log((DEVICE_NAME ":vboxNetFltSolarisMBlkToSG iSeg=%d pSG->cbTotal=%d msgdsize=%d\n", iSeg, pSG->cbTotal, msgdsize(pMsg)));
3522 PINTNETSG pSG = (PINTNETSG)alloca(RT_OFFSETOF(INTNETSG, aSegs[cSegs]));
3523 int rc = vboxNetFltSolarisMBlkToSG(pThis, pMsg, pSG, cSegs, fSrc);
3525 pThis->pSwitchPort->pfnRecv(pThis->pSwitchPort, NULL /* pvIf */, pSG, fSrc);
3914 int vboxNetFltPortOsXmit(PVBOXNETFLTINS pThis, void *pvIfData, PINTNETSG pSG, uint32_t fDst)
3917 LogFunc((DEVICE_NAME ":vboxNetFltPortOsXmit pThis=%p pSG=%p fDst=%d\n", pThis, pSG, fDst));
3926 mblk_t *pMsg = vboxNetFltSolarisMBlkFromSG(pThis, pSG, fDst);
3955 mblk_t *pMsg = vboxNetFltSolarisMBlkFromSG(pThis, pSG, fDst);