Searched refs:pSgBuf (Results 1 - 25 of 48) sorted by relevance

12

/vbox/src/VBox/Runtime/common/misc/
H A Dsg.cpp37 static void *sgBufGet(PRTSGBUF pSgBuf, size_t *pcbData) argument
43 if (RT_UNLIKELY( pSgBuf->idxSeg == pSgBuf->cSegs
44 && !pSgBuf->cbSegLeft))
51 AssertReleaseMsg( pSgBuf->cbSegLeft <= 32 * _1M
52 && (uintptr_t)pSgBuf->pvSegCur >= (uintptr_t)pSgBuf->paSegs[pSgBuf->idxSeg].pvSeg
53 && (uintptr_t)pSgBuf->pvSegCur + pSgBuf
83 RTSgBufInit(PRTSGBUF pSgBuf, PCRTSGSEG paSegs, size_t cSegs) argument
98 RTSgBufReset(PRTSGBUF pSgBuf) argument
121 RTSgBufGetNextSegment(PRTSGBUF pSgBuf, size_t *pcbSeg) argument
272 RTSgBufSet(PRTSGBUF pSgBuf, uint8_t ubFill, size_t cbSet) argument
295 RTSgBufCopyToBuf(PRTSGBUF pSgBuf, void *pvBuf, size_t cbCopy) argument
320 RTSgBufCopyFromBuf(PRTSGBUF pSgBuf, const void *pvBuf, size_t cbCopy) argument
345 RTSgBufAdvance(PRTSGBUF pSgBuf, size_t cbAdvance) argument
368 RTSgBufSegArrayCreate(PRTSGBUF pSgBuf, PRTSGSEG paSeg, unsigned *pcSeg, size_t cbData) argument
427 RTSgBufIsZero(PRTSGBUF pSgBuf, size_t cbCheck) argument
[all...]
/vbox/include/iprt/
H A Dsg.h79 * @param pSgBuf Pointer to the S/G buffer to initialize.
83 RTDECL(void) RTSgBufInit(PRTSGBUF pSgBuf, PCRTSGSEG paSegs, size_t cSegs);
89 * @param pSgBuf The S/G buffer to reset.
91 RTDECL(void) RTSgBufReset(PRTSGBUF pSgBuf); variable
109 * @param pSgBuf The S/G buffer.
118 RTDECL(void *) RTSgBufGetNextSegment(PRTSGBUF pSgBuf, size_t *pcbSeg);
165 * @param pSgBuf The S/G buffer.
171 RTDECL(size_t) RTSgBufSet(PRTSGBUF pSgBuf, uint8_t ubFill, size_t cbSet);
177 * @param pSgBuf The S/G buffer to copy from.
183 RTDECL(size_t) RTSgBufCopyToBuf(PRTSGBUF pSgBuf, voi
[all...]
H A Daiomgr.h121 * @param pSgBuf S/G buffer to read into. The buffer is advanced
127 PRTSGBUF pSgBuf, size_t cbRead, void *pvUser);
135 * @param pSgBuf S/G buffer to read from. The buffer is advanced
141 PRTSGBUF pSgBuf, size_t cbWrite, void *pvUser);
H A Dsocket.h274 * @param pSgBuf Scatter/gather buffer to write data to socket.
276 RTDECL(int) RTSocketSgWrite(RTSOCKET hSocket, PCRTSGBUF pSgBuf);
352 * @param pSgBuf Scatter/gather buffer to write data to socket.
355 RTR3DECL(int) RTSocketSgWriteNB(RTSOCKET Sock, PCRTSGBUF pSgBuf, size_t *pcbWritten);
/vbox/src/VBox/Storage/testcase/
H A DVDMemDisk.h58 * @param pSgBuf The S/G buffer to write from.
60 int VDMemDiskWrite(PVDMEMDISK pMemDisk, uint64_t off, size_t cbWrite, PRTSGBUF pSgBuf);
71 * @param pSgBuf The S/G buffer to read into.
73 int VDMemDiskRead(PVDMEMDISK pMemDisk, uint64_t off, size_t cbRead, PRTSGBUF pSgBuf);
125 * @param pSgBuf The S/G buffer to compare with.
127 int VDMemDiskCmp(PVDMEMDISK pMemDisk, uint64_t off, size_t cbCmp, PRTSGBUF pSgBuf);
H A DVDIoBackendMem.h70 * @param pSgBuf S/G buffer to use.
76 PRTSGBUF pSgBuf, PFNVDIOCOMPLETE pfnComplete, void *pvUser);
H A DVDMemDisk.cpp96 int VDMemDiskWrite(PVDMEMDISK pMemDisk, uint64_t off, size_t cbWrite, PRTSGBUF pSgBuf) argument
100 LogFlowFunc(("pMemDisk=%#p off=%llu cbWrite=%zu pSgBuf=%#p\n",
101 pMemDisk, off, cbWrite, pSgBuf));
104 AssertPtrReturn(pSgBuf, VERR_INVALID_POINTER);
163 size_t cbCopied = RTSgBufCopyToBuf(pSgBuf, (uint8_t *)pSeg->pvSeg + offSeg, cbRange);
183 int VDMemDiskRead(PVDMEMDISK pMemDisk, uint64_t off, size_t cbRead, PRTSGBUF pSgBuf) argument
185 LogFlowFunc(("pMemDisk=%#p off=%llu cbRead=%zu pSgBuf=%#p\n",
186 pMemDisk, off, cbRead, pSgBuf));
189 AssertPtrReturn(pSgBuf, VERR_INVALID_POINTER);
218 RTSgBufSet(pSgBuf,
346 VDMemDiskCmp(PVDMEMDISK pMemDisk, uint64_t off, size_t cbCmp, PRTSGBUF pSgBuf) argument
[all...]
H A DVDIoBackend.cpp184 size_t cbTransfer, PRTSGBUF pSgBuf, void *pvUser, bool fSync)
193 enmTxDir, off, cbTransfer, pSgBuf, pIoStorage->pfnComplete,
201 rc = VDMemDiskRead(pIoStorage->u.pMemDisk, off, cbTransfer, pSgBuf);
204 rc = VDMemDiskWrite(pIoStorage->u.pMemDisk, off, cbTransfer, pSgBuf);
220 rc = RTAioMgrFileRead(pIoStorage->u.File.hAioMgrFile, off, pSgBuf, cbTransfer, pvUser);
223 rc = RTAioMgrFileWrite(pIoStorage->u.File.hAioMgrFile, off, pSgBuf, cbTransfer, pvUser);
239 rc = RTFileSgReadAt(pIoStorage->u.File.hFile, off, pSgBuf, cbTransfer, NULL);
242 rc = RTFileSgWriteAt(pIoStorage->u.File.hFile, off, pSgBuf, cbTransfer, NULL);
183 VDIoBackendTransfer(PVDIOSTORAGE pIoStorage, VDIOTXDIR enmTxDir, uint64_t off, size_t cbTransfer, PRTSGBUF pSgBuf, void *pvUser, bool fSync) argument
H A DVDIoBackend.h85 * @param pSgBuf S/G buffer to use.
90 size_t cbTransfer, PRTSGBUF pSgBuf, void *pvUser, bool fSync);
/vbox/src/VBox/Devices/Network/
H A DDrvUDPTunnel.cpp137 PPDMSCATTERGATHER pSgBuf = (PPDMSCATTERGATHER)RTMemAlloc( RT_ALIGN_Z(sizeof(*pSgBuf), 16) local
140 if (!pSgBuf)
146 pSgBuf->fFlags = PDMSCATTERGATHER_FLAGS_MAGIC | PDMSCATTERGATHER_FLAGS_OWNER_1;
147 pSgBuf->cbUsed = 0;
148 pSgBuf->cbAvailable = RT_ALIGN_Z(cbMin, 16);
149 pSgBuf->pvAllocator = NULL;
151 pSgBuf->pvUser = NULL;
154 pSgBuf->pvUser = (uint8_t *)(pSgBuf
172 drvUDPTunnelUp_FreeBuf(PPDMINETWORKUP pInterface, PPDMSCATTERGATHER pSgBuf) argument
189 drvUDPTunnelUp_SendBuf(PPDMINETWORKUP pInterface, PPDMSCATTERGATHER pSgBuf, bool fOnWorkerThread) argument
[all...]
H A DDrvVDE.cpp146 PPDMSCATTERGATHER pSgBuf = (PPDMSCATTERGATHER)RTMemAlloc( RT_ALIGN_Z(sizeof(*pSgBuf), 16) local
149 if (!pSgBuf)
155 pSgBuf->fFlags = PDMSCATTERGATHER_FLAGS_MAGIC | PDMSCATTERGATHER_FLAGS_OWNER_1;
156 pSgBuf->cbUsed = 0;
157 pSgBuf->cbAvailable = RT_ALIGN_Z(cbMin, 16);
158 pSgBuf->pvAllocator = NULL;
160 pSgBuf->pvUser = NULL;
163 pSgBuf->pvUser = (uint8_t *)(pSgBuf
181 drvVDENetworkUp_FreeBuf(PPDMINETWORKUP pInterface, PPDMSCATTERGATHER pSgBuf) argument
198 drvVDENetworkUp_SendBuf(PPDMINETWORKUP pInterface, PPDMSCATTERGATHER pSgBuf, bool fOnWorkerThread) argument
[all...]
H A DDrvDedicatedNic.cpp252 PDMBOTHCBDECL(int) drvDedicatedNicUp_FreeBuf(PPDMINETWORKUP pInterface, PPDMSCATTERGATHER pSgBuf) argument
255 Assert(pSgBuf->fFlags == (PDMSCATTERGATHER_FLAGS_MAGIC | PDMSCATTERGATHER_FLAGS_OWNER_1));
256 Assert(pSgBuf->cbUsed <= pSgBuf->cbAvailable);
259 if (pSgBuf)
264 Assert(pSgBuf == &pThis->XmitSg);
265 Assert((pSgBuf->fFlags & PDMSCATTERGATHER_FLAGS_MAGIC_MASK) == PDMSCATTERGATHER_FLAGS_MAGIC);
266 pSgBuf->fFlags = 0;
277 PDMBOTHCBDECL(int) drvDedicatedNicUp_SendBuf(PPDMINETWORKUP pInterface, PPDMSCATTERGATHER pSgBuf, bool fOnWorkerThread) argument
282 AssertPtr(pSgBuf);
[all...]
H A DDrvTAP.cpp177 PPDMSCATTERGATHER pSgBuf = (PPDMSCATTERGATHER)RTMemAlloc( RT_ALIGN_Z(sizeof(*pSgBuf), 16) local
180 if (!pSgBuf)
186 pSgBuf->fFlags = PDMSCATTERGATHER_FLAGS_MAGIC | PDMSCATTERGATHER_FLAGS_OWNER_1;
187 pSgBuf->cbUsed = 0;
188 pSgBuf->cbAvailable = RT_ALIGN_Z(cbMin, 16);
189 pSgBuf->pvAllocator = NULL;
191 pSgBuf->pvUser = NULL;
194 pSgBuf->pvUser = (uint8_t *)(pSgBuf
212 drvTAPNetworkUp_FreeBuf(PPDMINETWORKUP pInterface, PPDMSCATTERGATHER pSgBuf) argument
229 drvTAPNetworkUp_SendBuf(PPDMINETWORKUP pInterface, PPDMSCATTERGATHER pSgBuf, bool fOnWorkerThread) argument
[all...]
H A DDrvNAT.cpp362 * @param pSgBuf The S/G buffer to free.
364 static void drvNATFreeSgBuf(PDRVNAT pThis, PPDMSCATTERGATHER pSgBuf) argument
366 Assert((pSgBuf->fFlags & PDMSCATTERGATHER_FLAGS_MAGIC_MASK) == PDMSCATTERGATHER_FLAGS_MAGIC);
367 pSgBuf->fFlags = 0;
368 if (pSgBuf->pvAllocator)
370 Assert(!pSgBuf->pvUser);
371 slirp_ext_m_free(pThis->pNATState, (struct mbuf *)pSgBuf->pvAllocator, NULL);
372 pSgBuf->pvAllocator = NULL;
374 else if (pSgBuf->pvUser)
376 RTMemFree(pSgBuf
391 drvNATSendWorker(PDRVNAT pThis, PPDMSCATTERGATHER pSgBuf) argument
486 PPDMSCATTERGATHER pSgBuf = (PPDMSCATTERGATHER)RTMemAlloc(sizeof(*pSgBuf)); local
553 drvNATNetworkUp_FreeBuf(PPDMINETWORKUP pInterface, PPDMSCATTERGATHER pSgBuf) argument
564 drvNATNetworkUp_SendBuf(PPDMINETWORKUP pInterface, PPDMSCATTERGATHER pSgBuf, bool fOnWorkerThread) argument
[all...]
H A DDrvNetSniffer.cpp115 static DECLCALLBACK(int) drvNetSnifferUp_FreeBuf(PPDMINETWORKUP pInterface, PPDMSCATTERGATHER pSgBuf) argument
120 return pThis->pIBelowNet->pfnFreeBuf(pThis->pIBelowNet, pSgBuf);
127 static DECLCALLBACK(int) drvNetSnifferUp_SendBuf(PPDMINETWORKUP pInterface, PPDMSCATTERGATHER pSgBuf, bool fOnWorkerThread) argument
135 if (!pSgBuf->pvUser)
137 pSgBuf->aSegs[0].pvSeg,
138 pSgBuf->cbUsed,
139 RT_MIN(pSgBuf->cbUsed, pSgBuf->aSegs[0].cbSeg));
141 PcapFileGsoFrame(pThis->hFile, pThis->StartNanoTS, (PCPDMNETWORKGSO)pSgBuf->pvUser,
142 pSgBuf
[all...]
H A DDrvIntNet.cpp374 PPDMSCATTERGATHER pSgBuf = (PPDMSCATTERGATHER)RTMemCacheAlloc(pThis->hSgCache); local
375 if (!pSgBuf)
378 PPDMSCATTERGATHER pSgBuf = &pThis->u.Sg;
379 if (RT_UNLIKELY(pSgBuf->fFlags != 0))
393 &pHdr, &pSgBuf->aSegs[0].pvSeg);
396 &pHdr, &pSgBuf->aSegs[0].pvSeg);
404 &pHdr, &pSgBuf->aSegs[0].pvSeg);
407 &pHdr, &pSgBuf->aSegs[0].pvSeg);
415 pSgBuf->fFlags = PDMSCATTERGATHER_FLAGS_MAGIC | PDMSCATTERGATHER_FLAGS_OWNER_1;
416 pSgBuf
456 drvIntNetUp_FreeBuf(PPDMINETWORKUP pInterface, PPDMSCATTERGATHER pSgBuf) argument
485 drvIntNetUp_SendBuf(PPDMINETWORKUP pInterface, PPDMSCATTERGATHER pSgBuf, bool fOnWorkerThread) argument
[all...]
/vbox/include/VBox/vmm/
H A Dpdmnetifs.h96 * @param pSgBuf .
99 DECLINLINE(void) PDMScatterGatherSetOwner(PPDMSCATTERGATHER pSgBuf, uint32_t uNewOwner) argument
101 pSgBuf->fFlags = (pSgBuf->fFlags & ~PDMSCATTERGATHER_FLAGS_OWNER_MASK) | uNewOwner;
260 * @param pSgBuf A buffer from PDMINETWORKUP::pfnAllocBuf or
266 DECLR3CALLBACKMEMBER(int, pfnFreeBuf,(PPDMINETWORKUP pInterface, PPDMSCATTERGATHER pSgBuf));
272 * @retval VERR_NET_DOWN if the NIC is not connected to a network. pSgBuf will
274 * @retval VERR_NET_NO_BUFFER_SPACE if we're out of resources. pSgBuf will be
279 * @param pSgBuf The buffer containing the data to send. The buffer
288 DECLR3CALLBACKMEMBER(int, pfnSendBuf,(PPDMINETWORKUP pInterface, PPDMSCATTERGATHER pSgBuf, boo
[all...]
/vbox/src/VBox/Storage/
H A DVDIfVfs.cpp85 static DECLCALLBACK(int) vdIfVfsIos_Read(void *pvThis, RTFOFF off, PCRTSGBUF pSgBuf, bool fBlocking, size_t *pcbRead) argument
88 Assert(pSgBuf->cSegs == 1); NOREF(fBlocking);
98 rc = vdIfIoFileReadSync(pThis->pVDIfsIo, pThis->pStorage, off, pSgBuf[0].pvSegCur, pSgBuf->paSegs[0].cbSeg, pcbRead);
101 rc = vdIfIoIntFileReadSync(pThis->pVDIfsIoInt, (PVDIOSTORAGE)pThis->pStorage, off, pSgBuf[0].pvSegCur, pSgBuf->paSegs[0].cbSeg);
103 *pcbRead = RT_SUCCESS(rc) ? pSgBuf->paSegs[0].cbSeg : 0;
107 size_t cbAdvance = pcbRead ? *pcbRead : pSgBuf->paSegs[0].cbSeg;
119 static DECLCALLBACK(int) vdIfVfsIos_Write(void *pvThis, RTFOFF off, PCRTSGBUF pSgBuf, bool fBlocking, size_t *pcbWritten) argument
122 Assert(pSgBuf
[all...]
H A DVDVfs.cpp224 static DECLCALLBACK(int) vdVfsFile_Read(void *pvThis, RTFOFF off, PCRTSGBUF pSgBuf, bool fBlocking, size_t *pcbRead) argument
229 Assert(pSgBuf->cSegs == 1);
248 if (offUnsigned + pSgBuf->paSegs[0].cbSeg > VDGetSize(pThis->pDisk, VD_LAST_IMAGE))
256 cbLeftToRead = pSgBuf->paSegs[0].cbSeg;
266 rc = vdReadHelper(pThis->pDisk, (uint64_t)off, pSgBuf->paSegs[0].pvSeg, cbLeftToRead);
279 static DECLCALLBACK(int) vdVfsFile_Write(void *pvThis, RTFOFF off, PCRTSGBUF pSgBuf, bool fBlocking, size_t *pcbWritten) argument
284 Assert(pSgBuf->cSegs == 1);
303 if (offUnsigned + pSgBuf->paSegs[0].cbSeg > VDGetSize(pThis->pDisk, VD_LAST_IMAGE))
311 cbLeftToWrite = pSgBuf->paSegs[0].cbSeg;
321 rc = vdWriteHelper(pThis->pDisk, (uint64_t)off, pSgBuf
[all...]
/vbox/src/VBox/Runtime/common/vfs/
H A Dvfsstdfile.cpp132 static DECLCALLBACK(int) rtVfsStdFile_Read(void *pvThis, RTFOFF off, PCRTSGBUF pSgBuf, bool fBlocking, size_t *pcbRead) argument
138 if (pSgBuf->cSegs == 1)
141 rc = RTFileRead( pThis->hFile, pSgBuf->paSegs[0].pvSeg, pSgBuf->paSegs[0].cbSeg, pcbRead);
143 rc = RTFileReadAt(pThis->hFile, off, pSgBuf->paSegs[0].pvSeg, pSgBuf->paSegs[0].cbSeg, pcbRead);
145 rc = rtVfsStdFile_ReadFixRC(pThis, off, pSgBuf->paSegs[0].cbSeg, *pcbRead);
154 for (uint32_t iSeg = 0; iSeg < pSgBuf->cSegs; iSeg++)
156 void *pvSeg = pSgBuf->paSegs[iSeg].pvSeg;
157 cbSeg = pSgBuf
188 rtVfsStdFile_Write(void *pvThis, RTFOFF off, PCRTSGBUF pSgBuf, bool fBlocking, size_t *pcbWritten) argument
[all...]
H A Dvfsmemory.cpp250 static DECLCALLBACK(int) rtVfsMemFile_Read(void *pvThis, RTFOFF off, PCRTSGBUF pSgBuf, bool fBlocking, size_t *pcbRead) argument
254 Assert(pSgBuf->cSegs == 1);
274 if (offUnsigned + pSgBuf->paSegs[0].cbSeg > (uint64_t)pThis->Base.ObjInfo.cbObject)
282 cbLeftToRead = pSgBuf->paSegs[0].cbSeg;
292 uint8_t *pbDst = (uint8_t *)pSgBuf->paSegs[0].pvSeg;
445 static DECLCALLBACK(int) rtVfsMemFile_Write(void *pvThis, RTFOFF off, PCRTSGBUF pSgBuf, bool fBlocking, size_t *pcbWritten) argument
449 Assert(pSgBuf->cSegs == 1);
456 size_t cbLeftToWrite = pSgBuf->paSegs[0].cbSeg;
464 uint8_t const *pbSrc = (uint8_t const *)pSgBuf->paSegs[0].pvSeg;
539 *pcbWritten = pSgBuf
[all...]
/vbox/src/VBox/Runtime/common/dvm/
H A Ddvmvfs.cpp89 static DECLCALLBACK(int) rtDvmVfsFile_Read(void *pvThis, RTFOFF off, PCRTSGBUF pSgBuf, bool fBlocking, size_t *pcbRead) argument
94 Assert(pSgBuf->cSegs == 1);
113 if (offUnsigned + pSgBuf->paSegs[0].cbSeg > RTDvmVolumeGetSize(pThis->hVol))
121 cbLeftToRead = pSgBuf->paSegs[0].cbSeg;
131 rc = RTDvmVolumeRead(pThis->hVol, (uint64_t)off, pSgBuf->paSegs[0].pvSeg, cbLeftToRead);
144 static DECLCALLBACK(int) rtDvmVfsFile_Write(void *pvThis, RTFOFF off, PCRTSGBUF pSgBuf, bool fBlocking, size_t *pcbWritten) argument
149 Assert(pSgBuf->cSegs == 1);
168 if (offUnsigned + pSgBuf->paSegs[0].cbSeg > RTDvmVolumeGetSize(pThis->hVol))
176 cbLeftToWrite = pSgBuf->paSegs[0].cbSeg;
186 rc = RTDvmVolumeWrite(pThis->hVol, (uint64_t)off, pSgBuf
[all...]
/vbox/src/VBox/Runtime/common/zip/
H A Dpkzip.cpp89 static DECLCALLBACK(int) memFssIos_Read(void *pvThis, RTFOFF off, PCRTSGBUF pSgBuf, bool fBlocking, size_t *pcbRead) argument
92 Assert(pSgBuf->cSegs == 1);
100 size_t cbToRead = pSgBuf->paSegs[0].cbSeg;
108 memcpy(pSgBuf->paSegs[0].pvSeg, pThis->pu8Buf + off, cbToRead);
119 static DECLCALLBACK(int) memFssIos_Write(void *pvThis, RTFOFF off, PCRTSGBUF pSgBuf, bool fBlocking, size_t *pcbWritten) argument
/vbox/src/VBox/Runtime/common/checksum/
H A Dmanifest3.cpp294 * @param pSgBuf The scather/gather buffer.
297 static void rtManifestPtIos_UpdateHashes(PRTMANIFESTPTIOS pThis, PCRTSGBUF pSgBuf, size_t cbLeft) argument
299 for (uint32_t iSeg = 0; iSeg < pSgBuf->cSegs; iSeg++)
301 size_t cbSeg = pSgBuf->paSegs[iSeg].cbSeg;
304 rtManifestHashesUpdate(pThis->pHashes, pSgBuf->paSegs[iSeg].pvSeg, cbSeg);
314 static DECLCALLBACK(int) rtManifestPtIos_Read(void *pvThis, RTFOFF off, PCRTSGBUF pSgBuf, bool fBlocking, size_t *pcbRead) argument
317 int rc = RTVfsIoStrmSgRead(pThis->hVfsIos, pSgBuf, fBlocking, pcbRead);
319 rtManifestPtIos_UpdateHashes(pThis, pSgBuf, pcbRead ? *pcbRead : ~(size_t)0);
328 static DECLCALLBACK(int) rtManifestPtIos_Write(void *pvThis, RTFOFF off, PCRTSGBUF pSgBuf, bool fBlocking, size_t *pcbWritten) argument
331 int rc = RTVfsIoStrmSgWrite(pThis->hVfsIos, pSgBuf, fBlockin
[all...]
/vbox/include/VBox/
H A Dvddbg.h159 * @param pSgBuf The data the I/O request is writing if it is a write request.
164 VBOXDDU_DECL(int) VDDbgIoLogStart(VDIOLOGGER hIoLogger, bool fAsync, VDDBGIOLOGREQ enmTxDir, uint64_t off, size_t cbIo, PCRTSGBUF pSgBuf,
187 * @param pSgBuf The data read if the request was a read and it succeeded.
189 VBOXDDU_DECL(int) VDDbgIoLogComplete(VDIOLOGGER hIoLogger, VDIOLOGENT hIoLogEntry, int rcReq, PCRTSGBUF pSgBuf);

Completed in 113 milliseconds

12