Lines Matching refs:cbFrame
139 * @param cbFrame The size of the frame.
141 DECLINLINE(void) IntNetSgInitTemp(PINTNETSG pSG, void *pvFrame, uint32_t cbFrame)
143 IntNetSgInitTempSegs(pSG, cbFrame, 1, 1);
146 pSG->aSegs[0].cb = cbFrame;
155 * @param cbFrame The size of the frame.
158 DECLINLINE(void) IntNetSgInitTempGso(PINTNETSG pSG, void *pvFrame, uint32_t cbFrame, PCPDMNETWORKGSO pGso)
160 IntNetSgInitTempSegsGso(pSG, cbFrame, 1, 1, pGso);
163 pSG->aSegs[0].cb = cbFrame;
332 Assert(off + pHdr->cbFrame <= pBuf->cbBuf);
345 * is INTNETBUF::cbFrame - sizeof(PDMNETWORKGSO).
358 Assert(off + pHdr->cbFrame <= pBuf->cbBuf);
380 uint32_t offReadNew = offReadOld + pHdr->offFrame + pHdr->cbFrame;
387 memset((uint8_t *)pHdr + pHdr->offFrame, 0xfe, RT_ALIGN_32(pHdr->cbFrame, INTNETHDR_ALIGNMENT));
399 * @param cbFrame The frame size.
404 DECLINLINE(int) intnetRingAllocateFrameInternal(PINTNETRINGBUF pRingBuf, uint32_t cbFrame, uint8_t u8Type,
411 Assert(cbFrame >= sizeof(RTMAC) * 2);
413 const uint32_t cb = RT_ALIGN_32(cbFrame, INTNETHDR_ALIGNMENT);
428 Log2(("intnetRingAllocateFrameInternal: offWriteInt: %#x -> %#x (1) (R=%#x T=%#x S=%#x)\n", offWriteInt, offNew, offRead, u8Type, cbFrame));
432 pHdr->cbFrame = cbFrame; Assert(pHdr->cbFrame == cbFrame);
449 Log2(("intnetRingAllocateFrameInternal: offWriteInt: %#x -> %#x (2) (R=%#x T=%#x S=%#x)\n", offWriteInt, offNew, offRead, u8Type, cbFrame));
453 pHdr->cbFrame = cbFrame; Assert(pHdr->cbFrame == cbFrame);
469 Log2(("intnetRingAllocateFrameInternal: offWriteInt: %#x -> %#x (3) (R=%#x T=%#x S=%#x)\n", offWriteInt, offNew, offRead, u8Type, cbFrame));
473 pHdr->cbFrame = cbFrame; Assert(pHdr->cbFrame == cbFrame);
494 * @param cbFrame The frame size.
499 DECLINLINE(int) IntNetRingAllocateFrame(PINTNETRINGBUF pRingBuf, uint32_t cbFrame, PINTNETHDR *ppHdr, void **ppvFrame)
501 return intnetRingAllocateFrameInternal(pRingBuf, cbFrame, INTNETHDR_TYPE_FRAME, ppHdr, ppvFrame);
510 * @param cbFrame The frame size.
516 DECLINLINE(int) IntNetRingAllocateGsoFrame(PINTNETRINGBUF pRingBuf, uint32_t cbFrame, PCPDMNETWORKGSO pGso,
520 int rc = intnetRingAllocateFrameInternal(pRingBuf, cbFrame + sizeof(*pGso), INTNETHDR_TYPE_GSO, ppHdr, &pvFrame);
553 const uint32_t cbFrame = pHdr->cbFrame;
554 const uint32_t cb = RT_ALIGN_32(cbFrame, INTNETHDR_ALIGNMENT);
563 Log2(("IntNetRingCommitFrame: offWriteCom: %#x -> %#x (R=%#x T=%#x S=%#x)\n", pRingBuf->offWriteCom, offWriteCom, pRingBuf->offReadX, pHdr->u8Type, cbFrame));
565 STAM_REL_COUNTER_ADD(&pRingBuf->cbStatWritten, cbFrame);
597 const uint32_t cbAlignedFrame = RT_ALIGN_32(pHdr->cbFrame, INTNETHDR_ALIGNMENT);
616 pHdrPadding->cbFrame = cbAlignedFrame - cbAlignedUsed - sizeof(INTNETHDR);
617 Assert(pHdrPadding->cbFrame == cbAlignedFrame - cbAlignedUsed - sizeof(INTNETHDR));
619 pHdr->cbFrame = cbUsed; Assert(pHdr->cbFrame == cbUsed);
622 Log2(("IntNetRingCommitFrameEx: offWriteCom: %#x -> %#x (R=%#x T=%#x S=%#x P=%#x)\n", pRingBuf->offWriteCom, offWriteCom, pRingBuf->offReadX, pHdr->u8Type, pHdr->cbFrame, cbAlignedFrame - cbAlignedUsed));
637 * @param cbFrame How much to write.
639 DECLINLINE(int) IntNetRingWriteFrame(PINTNETRINGBUF pRingBuf, const void *pvFrame, size_t cbFrame)
645 Assert(cbFrame >= sizeof(RTMAC) * 2);
650 const uint32_t cb = RT_ALIGN_32(cbFrame, INTNETHDR_ALIGNMENT);
669 pHdr->cbFrame = cbFrame; Assert(pHdr->cbFrame == cbFrame);
672 memcpy(pHdr + 1, pvFrame, cbFrame);
676 STAM_REL_COUNTER_ADD(&pRingBuf->cbStatWritten, cbFrame);
694 pHdr->cbFrame = cbFrame; Assert(pHdr->cbFrame == cbFrame);
697 memcpy((uint8_t *)pRingBuf + pRingBuf->offStart, pvFrame, cbFrame);
701 STAM_REL_COUNTER_ADD(&pRingBuf->cbStatWritten, cbFrame);
718 pHdr->cbFrame = cbFrame; Assert(pHdr->cbFrame == cbFrame);
721 memcpy(pHdr + 1, pvFrame, cbFrame);
725 STAM_REL_COUNTER_ADD(&pRingBuf->cbStatWritten, cbFrame);
758 uint32_t const cbFrame = pHdr->cbFrame;
761 memcpy(pvFrameDst, pvFrameSrc, cbFrame);
763 memset((void *)pvFrameSrc, 0xfe, RT_ALIGN_32(cbFrame, INTNETHDR_ALIGNMENT));
768 offRead += offFrame + cbFrame;
774 return cbFrame;